@@ -256,6 +256,7 @@ static bool wake_nocb_gp(struct rcu_data *rdp, bool force)
256256 return __wake_nocb_gp (rdp_gp , rdp , force , flags );
257257}
258258
259+ #ifdef CONFIG_RCU_LAZY
259260/*
260261 * LAZY_FLUSH_JIFFIES decides the maximum amount of time that
261262 * can elapse before lazy callbacks are flushed. Lazy callbacks
@@ -264,21 +265,20 @@ static bool wake_nocb_gp(struct rcu_data *rdp, bool force)
264265 * left unsubmitted to RCU after those many jiffies.
265266 */
266267#define LAZY_FLUSH_JIFFIES (10 * HZ)
267- static unsigned long jiffies_till_flush = LAZY_FLUSH_JIFFIES ;
268+ static unsigned long jiffies_lazy_flush = LAZY_FLUSH_JIFFIES ;
268269
269- #ifdef CONFIG_RCU_LAZY
270270// To be called only from test code.
271- void rcu_lazy_set_jiffies_till_flush (unsigned long jif )
271+ void rcu_set_jiffies_lazy_flush (unsigned long jif )
272272{
273- jiffies_till_flush = jif ;
273+ jiffies_lazy_flush = jif ;
274274}
275- EXPORT_SYMBOL (rcu_lazy_set_jiffies_till_flush );
275+ EXPORT_SYMBOL (rcu_set_jiffies_lazy_flush );
276276
277- unsigned long rcu_lazy_get_jiffies_till_flush (void )
277+ unsigned long rcu_get_jiffies_lazy_flush (void )
278278{
279- return jiffies_till_flush ;
279+ return jiffies_lazy_flush ;
280280}
281- EXPORT_SYMBOL (rcu_lazy_get_jiffies_till_flush );
281+ EXPORT_SYMBOL (rcu_get_jiffies_lazy_flush );
282282#endif
283283
284284/*
@@ -299,7 +299,7 @@ static void wake_nocb_gp_defer(struct rcu_data *rdp, int waketype,
299299 */
300300 if (waketype == RCU_NOCB_WAKE_LAZY &&
301301 rdp -> nocb_defer_wakeup == RCU_NOCB_WAKE_NOT ) {
302- mod_timer (& rdp_gp -> nocb_timer , jiffies + jiffies_till_flush );
302+ mod_timer (& rdp_gp -> nocb_timer , jiffies + rcu_get_jiffies_lazy_flush () );
303303 WRITE_ONCE (rdp_gp -> nocb_defer_wakeup , waketype );
304304 } else if (waketype == RCU_NOCB_WAKE_BYPASS ) {
305305 mod_timer (& rdp_gp -> nocb_timer , jiffies + 2 );
@@ -482,7 +482,7 @@ static bool rcu_nocb_try_bypass(struct rcu_data *rdp, struct rcu_head *rhp,
482482 // flush ->nocb_bypass to ->cblist.
483483 if ((ncbs && !bypass_is_lazy && j != READ_ONCE (rdp -> nocb_bypass_first )) ||
484484 (ncbs && bypass_is_lazy &&
485- (time_after (j , READ_ONCE (rdp -> nocb_bypass_first ) + jiffies_till_flush ))) ||
485+ (time_after (j , READ_ONCE (rdp -> nocb_bypass_first ) + rcu_get_jiffies_lazy_flush () ))) ||
486486 ncbs >= qhimark ) {
487487 rcu_nocb_lock (rdp );
488488 * was_alldone = !rcu_segcblist_pend_cbs (& rdp -> cblist );
@@ -723,7 +723,7 @@ static void nocb_gp_wait(struct rcu_data *my_rdp)
723723 lazy_ncbs = READ_ONCE (rdp -> lazy_len );
724724
725725 if (bypass_ncbs && (lazy_ncbs == bypass_ncbs ) &&
726- (time_after (j , READ_ONCE (rdp -> nocb_bypass_first ) + jiffies_till_flush ) ||
726+ (time_after (j , READ_ONCE (rdp -> nocb_bypass_first ) + rcu_get_jiffies_lazy_flush () ) ||
727727 bypass_ncbs > 2 * qhimark )) {
728728 flush_bypass = true;
729729 } else if (bypass_ncbs && (lazy_ncbs != bypass_ncbs ) &&
0 commit comments