Re: [PATCH v8 3/3] riscv: store percpu offset into thread_info

Davidlohr Bueso <[email protected]>
Newsgroups org.infradead.lists.linux-riscv,dev.linux.lists.llvm,org.kernel.vger.bpf,org.kernel.vger.linux-arch,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <20260826012457.ig3rfmji7vywf6kc@offworld>
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

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.