RCU use of swait

From: Paul E. McKenney
Date: Wed Mar 04 2020 - 19:35:30 EST


Hello!

RCU makes considerable use of swait and friends. The motivation I recall
was around offloaded callbacks, where in the old days the grace-period
kthread might do a wakeup for up to N tasks, where N is the number of
CPUs, all with interrupts disabled. This has since been reduced to
roughly sqrt(N) tasks, which might well still be too many wakeups to do
with interrupts disabled throughout.

However, the other use cases have at most one waiter to be awakened.

So I am guessing that I could usefully convert all but the rcu_node
structure's ->nocb_gp_wq field from swait to wait. Particularly the
use cases in SRCU and Tiny RCU.

Or is there some other reason why {S,}RCU needs to use swait that I
am forgetting?

Thanx, Paul