@@ -256,6 +256,7 @@ static bool wake_nocb_gp(struct rcu_data *rdp, bool force)
256
256
return __wake_nocb_gp (rdp_gp , rdp , force , flags );
257
257
}
258
258
259
+ #ifdef CONFIG_RCU_LAZY
259
260
/*
260
261
* LAZY_FLUSH_JIFFIES decides the maximum amount of time that
261
262
* can elapse before lazy callbacks are flushed. Lazy callbacks
@@ -264,21 +265,20 @@ static bool wake_nocb_gp(struct rcu_data *rdp, bool force)
264
265
* left unsubmitted to RCU after those many jiffies.
265
266
*/
266
267
#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 ;
268
269
269
- #ifdef CONFIG_RCU_LAZY
270
270
// 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 )
272
272
{
273
- jiffies_till_flush = jif ;
273
+ jiffies_lazy_flush = jif ;
274
274
}
275
- EXPORT_SYMBOL (rcu_lazy_set_jiffies_till_flush );
275
+ EXPORT_SYMBOL (rcu_set_jiffies_lazy_flush );
276
276
277
- unsigned long rcu_lazy_get_jiffies_till_flush (void )
277
+ unsigned long rcu_get_jiffies_lazy_flush (void )
278
278
{
279
- return jiffies_till_flush ;
279
+ return jiffies_lazy_flush ;
280
280
}
281
- EXPORT_SYMBOL (rcu_lazy_get_jiffies_till_flush );
281
+ EXPORT_SYMBOL (rcu_get_jiffies_lazy_flush );
282
282
#endif
283
283
284
284
/*
@@ -299,7 +299,7 @@ static void wake_nocb_gp_defer(struct rcu_data *rdp, int waketype,
299
299
*/
300
300
if (waketype == RCU_NOCB_WAKE_LAZY &&
301
301
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 () );
303
303
WRITE_ONCE (rdp_gp -> nocb_defer_wakeup , waketype );
304
304
} else if (waketype == RCU_NOCB_WAKE_BYPASS ) {
305
305
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,
482
482
// flush ->nocb_bypass to ->cblist.
483
483
if ((ncbs && !bypass_is_lazy && j != READ_ONCE (rdp -> nocb_bypass_first )) ||
484
484
(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 () ))) ||
486
486
ncbs >= qhimark ) {
487
487
rcu_nocb_lock (rdp );
488
488
* was_alldone = !rcu_segcblist_pend_cbs (& rdp -> cblist );
@@ -723,7 +723,7 @@ static void nocb_gp_wait(struct rcu_data *my_rdp)
723
723
lazy_ncbs = READ_ONCE (rdp -> lazy_len );
724
724
725
725
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 () ) ||
727
727
bypass_ncbs > 2 * qhimark )) {
728
728
flush_bypass = true;
729
729
} else if (bypass_ncbs && (lazy_ncbs != bypass_ncbs ) &&
0 commit comments