Skip to content

Commit 395e73b

Browse files
committed
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 <[email protected]> Closes: https://lore.kernel.org/all/irycqy4sinjdgm2hkyix2bffunpcmuwgeufsx6nlljvqme3wiu@ify3zdnrmzph/ Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 1613e60 commit 395e73b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/linux/srcu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ unsigned long get_state_synchronize_srcu(struct srcu_struct *ssp);
6161
unsigned long start_poll_synchronize_srcu(struct srcu_struct *ssp);
6262
bool poll_state_synchronize_srcu(struct srcu_struct *ssp, unsigned long cookie);
6363

64+
// Maximum number of unsigned long values corresponding to
65+
// not-yet-completed SRCU grace periods.
66+
#define NUM_ACTIVE_SRCU_POLL_OLDSTATE 2
67+
6468
#ifdef CONFIG_NEED_SRCU_NMI_SAFE
6569
int __srcu_read_lock_nmisafe(struct srcu_struct *ssp) __acquires(ssp);
6670
void __srcu_read_unlock_nmisafe(struct srcu_struct *ssp, int idx) __releases(ssp);

0 commit comments

Comments
 (0)