]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcu-tasks: Count trylocks to estimate call_rcu_tasks() contention
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 22 Nov 2021 21:38:42 +0000 (13:38 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 9 Dec 2021 18:52:11 +0000 (10:52 -0800)
commit7d13d30bb6c54b57d196eab89dea2729a565dbd7
tree9dc5bf8ff431699845418b16390776c2d9bfa2d4
parent8610b65680390a103b58f46282a1b05f7eebbba4
rcu-tasks: Count trylocks to estimate call_rcu_tasks() contention

This commit converts the unconditional raw_spin_lock_rcu_node() lock
acquisition in call_rcu_tasks_generic() to a trylock followed by an
unconditional acquisition if the trylock fails.  If the trylock fails,
the failure is counted, but the count is reset to zero on each new jiffy.

This statistic will be used to determine when to move from a single
callback queue to per-CPU callback queues.

Reported-by: Martin Lau <kafai@fb.com>
Cc: Neeraj Upadhyay <neeraj.iitr10@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tasks.h