rcu/exp: Handle parallel exp gp kworkers affinity
authorFrederic Weisbecker <frederic@kernel.org>
Fri, 12 Jan 2024 15:46:20 +0000 (16:46 +0100)
committerBoqun Feng <boqun.feng@gmail.com>
Wed, 14 Feb 2024 15:51:36 +0000 (07:51 -0800)
commitb67cffcbbf9dc759d95d330a5af5d1480af2b1f1
tree093bb0843a45c9b9f7fd4107e077c6edde14e620
parent8e5e621566485a3e160c0d8bfba206cb1d6b980d
rcu/exp: Handle parallel exp gp kworkers affinity

Affine the parallel expedited gp kworkers to their respective RCU node
in order to make them close to the cache their are playing with.

This reuses the boost kthreads machinery that probe into CPU hotplug
operations such that the kthreads become/stay affine to their respective
node as soon/long as they contain online CPUs. Otherwise and if the
current CPU going down was the last online on the leaf node, the related
kthread is affine to the housekeeping CPUs.

In the long run, this affinity VS CPU hotplug operation game should
probably be implemented at the generic kthread level.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
[boqun: s/* rcu_boost_task/*rcu_boost_task as reported by checkpatch]
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
kernel/rcu/tree.c
kernel/rcu/tree_plugin.h