]> www.infradead.org Git - users/jedix/linux-maple.git/commit
srcu: Allow inlining of __srcu_read_{,un}lock_lite()
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 15 Oct 2024 16:11:06 +0000 (09:11 -0700)
committerFrederic Weisbecker <frederic@kernel.org>
Tue, 12 Nov 2024 14:44:03 +0000 (15:44 +0100)
commitbb94b12e4503bdce003a74e95ee4214eba923f86
treefe9656f3fb60b58c06940ee91e499eaed3ba1380
parent6364dd8191d27230176ac4b1b4daaecaf4807399
srcu: Allow inlining of __srcu_read_{,un}lock_lite()

This commit moves __srcu_read_lock_lite() and __srcu_read_unlock_lite()
into include/linux/srcu.h and marks them "static inline" so that they
can be inlined into srcu_read_lock_lite() and srcu_read_unlock_lite(),
respectively.  They are not hand-inlined due to Tree SRCU and Tiny SRCU
having different implementations.

The earlier removal of smp_mb() combined with the inlining produce
significant single-percentage performance wins.

Link: https://lore.kernel.org/all/CAEf4BzYgiNmSb=ZKQ65tm6nJDi1UX2Gq26cdHSH1mPwXJYZj5g@mail.gmail.com/
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: <bpf@vger.kernel.org>
Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
include/linux/srcutree.h
kernel/rcu/srcutree.c