[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210428141824.GO975577@paulmck-ThinkPad-P17-Gen-1>
Date: Wed, 28 Apr 2021 07:18:24 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Aubrey Li <aubrey.intel@...il.com>, Josh Don <joshdon@...gle.com>,
Joel Fernandes <joel@...lfernandes.org>,
"Hyser,Chris" <chris.hyser@...cle.com>,
Ingo Molnar <mingo@...nel.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Valentin Schneider <valentin.schneider@....com>,
Mel Gorman <mgorman@...e.de>,
linux-kernel <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Don Hiatt <dhiatt@...italocean.com>
Subject: Re: [PATCH 04/19] sched: Prepare for Core-wide rq->lock
On Wed, Apr 28, 2021 at 01:03:29PM +0200, Peter Zijlstra wrote:
> On Wed, Apr 28, 2021 at 06:35:36PM +0800, Aubrey Li wrote:
> > On Wed, Apr 28, 2021 at 5:14 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> > > Ah, indeed so.. rq_lockp() could do with an assertion, not sure how to
> > > sanely do that. Anyway, double_rq_unlock() is simple enough to fix, we
> > > can simply flip the unlock()s.
> > >
> > > ( I'm suffering a cold and am really quite slow atm )
> > >
> > > How's this then?
> > >
> > > ---
> > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > > index f732642e3e09..3a534c0c1c46 100644
> > > --- a/kernel/sched/core.c
> > > +++ b/kernel/sched/core.c
> > > @@ -290,6 +290,10 @@ static void sched_core_assert_empty(void)
> > > static void __sched_core_enable(void)
> > > {
> > > static_branch_enable(&__sched_core_enabled);
> > > + /*
> > > + * Ensure raw_spin_rq_*lock*() have completed before flipping.
> > > + */
> > > + synchronize_sched();
> >
> > synchronize_sched() seems no longer exist...
>
> Bah.. Paul, why did that go away? I realize RCU merged in the sched and
> bh flavours, but I still find it expressive to use sync_sched() vs
> preempt_disable().
I could have made synchronize_sched() a synonym for synchronize_rcu(),
but that would be more likely to mislead than to help.
> Anyway, just use sync_rcu().
And yes, just use synchronize_rcu().
Thanx, Paul
Powered by blists - more mailing lists