[PATCH v2] arm64/sve: Don't zero the SVE state buffer when the SVE state is live

Catalin Marinas catalin.marinas at arm.com
Fri Oct 2 11:58:11 PDT 2026


On Tue, 15 Sep 2026 03:51:05 -0700, Breno Leitao wrote:
> Currently do_sve_acc() always zeroes current->thread.sve_state. This is
> not necessary in the common case, and avoiding the zeroing has a
> measurable impact on some benchmarks.
> 
> In the common case where the task is not preempted and its state is not
> altered by a tracer, do_sve_acc() will observe that TIF_FOREIGN_FPSTATE
> is clear. In such cases, only the live register values matter, and the
> in-memory copy is stale regardless of whether it is saved in
> FP_STATE_FPSIMD format or FP_STATE_SVE format.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/sve: Don't zero the SVE state buffer when the SVE state is live
      https://git.kernel.org/arm64/c/d6ae12c900f2



More information about the linux-arm-kernel mailing list