summaryrefslogtreecommitdiff
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-11-12 16:34:09 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-03 10:09:30 +0200
commit450948b06ce8ba3e22df094ef324dbf5fa52f050 (patch)
tree974a5a7980f53f894f5d76a6a87caa322e57913e /include/linux/writeback.h
parent641e1d88404a57983c75cc39b9feb076f5cdeac8 (diff)
srcu: Make Tiny SRCU use multi-bit grace-period counter
commit 74612a07b83fc46c2b2e6f71a541d55b024ebefc upstream. There is a need for a polling interface for SRCU grace periods. This polling needs to distinguish between an SRCU instance being idle on the one hand or in the middle of a grace period on the other. This commit therefore converts the Tiny SRCU srcu_struct structure's srcu_idx from a defacto boolean to a free-running counter, using the bottom bit to indicate that a grace period is in progress. The second-from-bottom bit is thus used as the index returned by srcu_read_lock(). Link: https://lore.kernel.org/rcu/20201112201547.GF3365678@moria.home.lan/ Reported-by: Kent Overstreet <kent.overstreet@gmail.com> [ paulmck: Fix ->srcu_lock_nesting[] indexing per Neeraj Upadhyay. ] 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>
Diffstat (limited to 'include/linux/writeback.h')
0 files changed, 0 insertions, 0 deletions