diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2024-06-09 20:12:19 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2024-06-18 10:13:37 -0700 |
commit | 395e73bd8d35fa9b8505e44f63a2a10abde09cce (patch) | |
tree | c9078205d38af47b7b934f8e090fd4a9a991b61f /include/linux/srcu.h | |
parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) |
srcu: Add NUM_ACTIVE_SRCU_POLL_OLDSTATE
This commit adds NUM_ACTIVE_SRCU_POLL_OLDSTATE, which gives the maximum
number of distinct return values from get_state_synchronize_rcu()
that can, at a given point in time, correspond to not-completed SRCU
grace periods.
Reported-by: Kent Overstreet <kent.overstreet@linux.dev>
Closes: https://lore.kernel.org/all/irycqy4sinjdgm2hkyix2bffunpcmuwgeufsx6nlljvqme3wiu@ify3zdnrmzph/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r-- | include/linux/srcu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 236610e4a8fa..f664cba7a80c 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -61,6 +61,10 @@ unsigned long get_state_synchronize_srcu(struct srcu_struct *ssp); unsigned long start_poll_synchronize_srcu(struct srcu_struct *ssp); bool poll_state_synchronize_srcu(struct srcu_struct *ssp, unsigned long cookie); +// Maximum number of unsigned long values corresponding to +// not-yet-completed SRCU grace periods. +#define NUM_ACTIVE_SRCU_POLL_OLDSTATE 2 + #ifdef CONFIG_NEED_SRCU_NMI_SAFE int __srcu_read_lock_nmisafe(struct srcu_struct *ssp) __acquires(ssp); void __srcu_read_unlock_nmisafe(struct srcu_struct *ssp, int idx) __releases(ssp); |