Skip to content

Optimize Vector context restore on syscall

Andy Chiu linux-riscv lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest0 of 1 patch 0 repliesNew

Patches in v2 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/1] Optimize Vector context restore on syscall

Accroding to the ABI, Vector registers are not preserved across a syscall. Therefore, the kernel invalidates all V-reg at the entry of the trap handler and marks the state dirty. This patch provide an optimization such that the invalidation is performed only once before returning back to the user space. Also by tracking this state, specifically reserving VS_INITIAL for this optimized restore, we cut the cost of saving and restoring V-reg at context switch for processes calling syscalls.

---
Changelog v2: rebase on top of for-next

Andy Chiu (1):
riscv: vector: treat VS_INITIAL as discard

 arch/riscv/include/asm/vector.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0