]> git.baikalelectronics.ru Git - kernel.git/commit
srcu: Make Tree SRCU able to operate without snp_node array
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 24 Jan 2022 17:46:57 +0000 (09:46 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 11 Apr 2022 22:31:02 +0000 (15:31 -0700)
commit5ca14651636be15babdf1910f686d3690dab1dd4
tree7c01572e0d810136116c6b26e548507961e809dc
parent82563e69b0aa15ff17b9dde65cc7c9cdd83e8032
srcu: Make Tree SRCU able to operate without snp_node array

This commit makes Tree SRCU able to operate without an snp_node
array, that is, when the srcu_data structures' ->mynode pointers
are NULL.  This can result in high contention on the srcu_struct
structure's ->lock, but only when there are lots of call_srcu(),
synchronize_srcu(), and synchronize_srcu_expedited() calls.

Note that when there is no snp_node array, all SRCU callbacks use
CPU 0's callback queue.  This is optimal in the common case of low
update-side load because it removes the need to search each CPU
for the single callback that made the grace period happen.

Co-developed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/srcutree.h
kernel/rcu/srcutree.c