]> www.infradead.org Git - users/willy/linux.git/commit
rcu/nocb: Remove rcu_node structure from nocb list when de-offloaded
authorFrederic Weisbecker <frederic@kernel.org>
Tue, 23 Nov 2021 00:37:03 +0000 (01:37 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 9 Dec 2021 19:34:07 +0000 (11:34 -0800)
commit2ebc45c44c4f3cc4c757430b2409ece4f976892e
tree0c9e06441054f59d678ec2ca7e81e475bfc1c954
parent0598a4d4429c0a952ac0e99e5280354cf4ccc01c
rcu/nocb: Remove rcu_node structure from nocb list when de-offloaded

The nocb_gp_wait() function iterates over all CPUs in its group,
including even those CPUs that have been de-offloaded.  This is of
course suboptimal, especially if none of the CPUs within the group are
currently offloaded.  This will become even more of a problem once a
nocb kthread is created for all possible CPUs.

Therefore use a standard double linked list to link all the offloaded
rcu_data structures and safely add or delete these structure as we
offload or de-offload them, respectively.

Reviewed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Joel Fernandes <joel@joelfernandes.org>
Tested-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.h
kernel/rcu/tree_nocb.h