Re: Query regarding synchronize_sched_expedited and resched_cpu
From: Paul E. McKenney
Date: Thu Sep 21 2017 - 11:31:44 EST
On Thu, Sep 21, 2017 at 03:55:46PM +0200, Peter Zijlstra wrote:
> On Mon, Sep 18, 2017 at 11:11:05AM -0400, Steven Rostedt wrote:
> > On Sun, 17 Sep 2017 11:37:06 +0530
> > Neeraj Upadhyay <neeraju@xxxxxxxxxxxxxx> wrote:
> >
> > > Hi Paul, how about replacing raw_spin_trylock_irqsave with
> > > raw_spin_lock_irqsave in resched_cpu()? Are there any paths
> > > in RCU code, which depend on trylock check/spinlock recursion?
> >
> > It looks to me that resched_cpu() was added for nohz full sched
> > balancing, but is not longer used by that. The only user is currently
> > RCU. Perhaps we should change that from a trylock to a lock.
>
> No, regular NOHZ balancing. NOHZ FULL wasn't conceived back then.
>
> 46cb4b7c88fa ("sched: dynticks idle load balancing")
>
> And yeah, its no longer used for that.
>
> And given RCU is the only user of that thing, I suppose we can indeed
> change it to a full lock.
Thank you! May I have your ack?
Thanx, Paul