[PATCH v8 3/3] riscv: store percpu offset into thread_info
Davidlohr Bueso
dave at stgolabs.net
Tue Aug 25 18:24:57 PDT 2026
On Fri, 03 Jul 2026, Yunhui Cui wrote:
>RISC-V percpu addressing currently derives the base offset from the CPU
>number and __per_cpu_offset[]. Cache the current CPU percpu offset in
>thread_info so percpu accesses can load it directly.
fyi on a sifive p550 I am seeing this_cpu_inc() cost dropping by ~15-20%
an adhoc microbench measuring/grouping various calls.
Thanks,
Davidlohr
More information about the linux-riscv
mailing list