(subset) [PATCH v4 00/21] Preemptible this_cpu_*() operations

Catalin Marinas catalin.marinas at arm.com
Thu Sep 24 09:03:49 PDT 2026


On Tue, 08 Sep 2026 16:17:20 +0100, Mark Rutland wrote:
> This series reworks arm64's this_cpu_*() operations such that they do
> not need to disable preemption. The scheme is described in detail in patch 13,
> and is similar to the approach Heiko Carstens applied to s390 [1], which
> inspired this series.
> 
> This scheme should build and function in all kernel configurations (e.g.
> regardless of KPTI, SW PAN, CNP, VA BITS), and has no dependency on new
> architectural features. The fixup logic should "just work" with kprobes,
> etc, and I don't expect that this will need to become more complicated.
> 
> [...]

Applied to arm64 (for-next/preemptible-this-cpu), thanks!

Patches 1-3 are already upstream as fixes (in -rc4, used as a base for
for-next/core). I fixed some minor comment typos in a couple of patches,
I haven't touched the code.

On v2, Usama reported performance regression in perf/sched and
perf/futex benchmarks that have not been addressed yet. It would be good
to run the tests again on this version, in case they were just noise. I
don't see why these would regress, maybe because of pt_regs being larger
and we get some more cache misses?

[04/21] arm64: cmpxchg: LL/SC: Avoid redundant extension
        https://git.kernel.org/arm64/c/78746ba584fc
[05/21] arm64: cmpxchg128: LSE: Remove redundant operands
        https://git.kernel.org/arm64/c/de2824489899
[06/21] arm64: preempt: Simplify and optimize __preempt_count_dec_and_test()
        https://git.kernel.org/arm64/c/1bee18253c2e
[07/21] arm64: preempt: Treat should_resched() as unlikely
        https://git.kernel.org/arm64/c/6254b223153d
[08/21] arm64: ptrace: Always inline pt_regs_[read,write}_reg()
        (no commit info)
[09/21] arm64: percpu: Factor out percpu offset asm
        https://git.kernel.org/arm64/c/b7f3aa93f407
[10/21] arm64: gpr-num: Add wxN aliases for wN registers
        https://git.kernel.org/arm64/c/47c62b09f03b
[11/21] arm64: gpr-num: add __GPR_NUM() helper
        https://git.kernel.org/arm64/c/05c44981d9ec
[12/21] arm64: entry: sdei: Restore all clobberable GPRs
        https://git.kernel.org/arm64/c/1e0a5cc90aab
[13/21] arm64: entry: sdei: Make 'tsk' available
        https://git.kernel.org/arm64/c/fb532fdb4430
[14/21] arm64: percpu: Add infrastructure for preemptible this_cpu_*() ops
        https://git.kernel.org/arm64/c/95d2c5f6663b
[15/21] arm64: percpu: Implement preemptible read/write ops
        https://git.kernel.org/arm64/c/6e2cec1c39b2
[16/21] arm64: percpu: Implement preemptible void RMW ops
        https://git.kernel.org/arm64/c/c7ac8f9baaef
[17/21] arm64: percpu: Implement preemptible return RMW ops
        https://git.kernel.org/arm64/c/6fe3da372d04
[18/21] arm64: percpu: Implement preemptible XCHG ops
        https://git.kernel.org/arm64/c/5e8ef5fb7720
[19/21] arm64: percpu: Implement preemptible CMPXCHG ops
        https://git.kernel.org/arm64/c/39d50a10e318
[20/21] arm64: percpu: Implement preemptible CMPXCHG128 ops
        https://git.kernel.org/arm64/c/c0ff52c3683c
[21/21] arm64: percpu: Remove _pcp_protect*() wrappers
        https://git.kernel.org/arm64/c/479671f943c9



More information about the linux-arm-kernel mailing list