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>
Showing
- include/linux/rcu_segcblist.h 1 addition, 3 deletionsinclude/linux/rcu_segcblist.h
- kernel/rcu/rcu_segcblist.c 0 additions, 11 deletionskernel/rcu/rcu_segcblist.c
- kernel/rcu/rcu_segcblist.h 1 addition, 1 deletionkernel/rcu/rcu_segcblist.h
- kernel/rcu/tree_nocb.h 66 additions, 72 deletionskernel/rcu/tree_nocb.h
Loading
Please register or sign in to comment