[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180710162637.GW3593@linux.vnet.ibm.com>
Date: Tue, 10 Jul 2018 09:26:37 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: David Woodhouse <dwmw2@...radead.org>, mhillenb@...zon.de,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] Make need_resched() return true when rcu_urgent_qs
requested
On Tue, Jul 10, 2018 at 11:24:26AM +0200, Peter Zijlstra wrote:
> On Mon, Jul 09, 2018 at 01:42:48PM -0700, Paul E. McKenney wrote:
> > On Mon, Jul 09, 2018 at 09:35:38PM +0100, David Woodhouse wrote:
> > >
> > >
> > > On Mon, 2018-07-09 at 13:34 -0700, Paul E. McKenney wrote:
> > > >
> > > > So here are the possible code paths when .rcu_urgent_qs is set to true:
> > > >
> > > > 1. A context switch will record the quiescent state and clear
> > > > .rcu_urgent_qs. (The failure to do the clearing in current -rcu
> > > > for PREEMPT builds is a performance bug that I need to fix.)
> > >
> > > What if there's nothing else runnable and there is no actual context
> > > switch?
> >
> > The scheduler invokes rcu_note_context_switch() before looking to see
> > if there really will or won't be a context switch.
>
> Correct. Just getting to __schedule() means we can schedule and thus is
> a valid point for RCU to progress. Even if we then end up selecting the
> very same task and not switching at all.
Thank you for the confirmation!
Thanx, Paul
Powered by blists - more mailing lists