]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
srcu: Provide internal interface to start a Tree SRCU grace period
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 13 Nov 2020 18:08:09 +0000 (10:08 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 09:58:49 +0000 (11:58 +0200)
commitadb11085ec8d9e81d176bc5d18a4fab9fe3c2222
tree7f41a4a047937d3815521e5c744343ed26e5e02a
parente3dc89764a5b1397eb90a53e2d94565ba394c93b
srcu: Provide internal interface to start a Tree SRCU grace period

BugLink: https://bugs.launchpad.net/bugs/1944610
commit 29d2bb94a8a126ce80ffbb433b648b32fdea524e 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
Tree SRCU __call_srcu() function into callback-initialization and
queuing/start-grace-period portions, with the latter in a new function
named srcu_gp_start_if_needed().  This function may be passed a NULL
callback pointer, in which case it will refrain from queuing anything.

Why have the new function mess with queuing?  Locking considerations,
of course!

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/rcu/srcutree.c