Skip to content

[PW_SID:1067676] [RFC] riscv: add userspace interface to voluntarily release vector state#1626

Open
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1067676
Open

[PW_SID:1067676] [RFC] riscv: add userspace interface to voluntarily release vector state#1626
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1067676

Conversation

@linux-riscv-bot
Copy link

PR for series 1067676 applied to workflow__riscv__fixes

Name: [RFC] riscv: add userspace interface to voluntarily release vector state
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1067676
Version: 1

Vector registers in RVV can be large, and saving/restoring them on
context switches introduces overhead. Some workloads only use
vector instructions in short phases, after which the vector state
does not need to be preserved.

This patch introduces a userspace-controlled mechanism:

- Userspace can declare that it no longer needs the vector state.
- Kernel will skip saving/restoring vector registers during context
  switch while the declaration is active.
- If the thread executes vector instructions after releasing its
  vector state, the kernel will revoke the declaration automatically.

This reduces unnecessary vector context switch overhead and improves
performance in workloads with intermittent vector usage.

This is an RFC patch to solicit feedback on the API design and
implementation approach.

Signed-off-by: daichengrong <daichengrong@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2151.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2928.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.59 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.34 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 4.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.34 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
kdoc
Desc: Detects for kdoc errors
Duration: 0.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[RFC] riscv: add userspace interface to voluntarily release vector state"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant