On 30/09/21 00:10, Frederic Weisbecker wrote: > Time limit only makes sense when callbacks are serviced in softirq mode > because: > > _ In case we need to get back to the scheduler, > cond_resched_tasks_rcu_qs() is called after each callback. > > _ In case some other softirq vector needs the CPU, the call to > local_bh_enable() before cond_resched_tasks_rcu_qs() takes care about > them via a call to do_softirq(). > > _ The time spent on other tasks after scheduling out, or on softirqs > processing, is spuriously accounted to the time limit. > That wasn't the case before ("rcu: Fix callbacks processing time limit retaining cond_resched()"), though under PREEMPT_RT that *was* true (since bh-off remains preemptible). So I'd say that's a change we want. > Therefore, make sure the time limit only applies to softirq mode. > > Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx> > Cc: Valentin Schneider <valentin.schneider@xxxxxxx> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> > Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx> > Cc: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> > Cc: Boqun Feng <boqun.feng@xxxxxxxxx> > Cc: Neeraj Upadhyay <neeraju@xxxxxxxxxxxxxx> > Cc: Uladzislau Rezki <urezki@xxxxxxxxx> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Reviewed-by: Valentin Schneider <valentin.schneider@xxxxxxx>