]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcu/nocb: Simplify (de-)offloading state machine
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 3 Jul 2024 22:56:40 +0000 (00:56 +0200)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Sun, 8 Sep 2024 18:33:55 +0000 (00:03 +0530)
commit1fcb932c8b5ce86219d7dedcd63659351a43291c
tree8fdee9206d294e08c9f6808aad832f5b6751a152
parent91e43b9044a4f9b6976dc28b3f1446b733cc68de
rcu/nocb: Simplify (de-)offloading state machine

Now that the (de-)offloading process can only apply to offline CPUs,
there is no more concurrency between rcu_core and nocb kthreads. Also
the mutation now happens on empty queues.

Therefore the state machine can be reduced to a single bit called
SEGCBLIST_OFFLOADED. Simplify the transition as follows:

* Upon offloading: queue the rdp to be added to the rcuog list and
  wait for the rcuog kthread to set the SEGCBLIST_OFFLOADED bit. Unpark
  rcuo kthread.

* Upon de-offloading: Park rcuo kthread. Queue the rdp to be removed
  from the rcuog list and wait for the rcuog kthread to clear the
  SEGCBLIST_OFFLOADED bit.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
include/linux/rcu_segcblist.h
kernel/rcu/rcu_segcblist.c
kernel/rcu/rcu_segcblist.h
kernel/rcu/tree_nocb.h