srcu: Provide internal interface to start a Tiny SRCU grace period
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 13 Nov 2020 17:37:39 +0000 (09:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 08:09:29 +0000 (10:09 +0200)
commit641e1d88404a57983c75cc39b9feb076f5cdeac8
tree10db2f873d10c6240deb4a20af5c635a94820be6
parentf789de3be808a0492a09cd7ad44cb017203572c6
srcu: Provide internal interface to start a Tiny SRCU grace period

commit 1a893c711a600ab57526619b56e6f6b7be00956e upstream.

There is a need for a polling interface for SRCU grace periods.
This polling needs to initiate an SRCU grace period without
having to queue (and manage) a callback.  This commit therefore
splits the Tiny SRCU call_srcu() function into callback-queuing and
start-grace-period portions, with the latter in a new function named
srcu_gp_start_if_needed().

Link: https://lore.kernel.org/rcu/20201112201547.GF3365678@moria.home.lan/
Reported-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/rcu/srcutiny.c