[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190923175233.yub32stn3xcwkaml@linutronix.de>
Date: Mon, 23 Sep 2019 19:52:33 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Scott Wood <swood@...hat.com>
Cc: linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
"Paul E . McKenney" <paulmck@...ux.ibm.com>,
Joel Fernandes <joel@...lfernandes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Clark Williams <williams@...hat.com>
Subject: Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep
On 2019-09-23 11:59:23 [-0500], Scott Wood wrote:
> On Tue, 2019-09-17 at 09:06 -0500, Scott Wood wrote:
> > On Tue, 2019-09-17 at 09:59 +0200, Sebastian Andrzej Siewior wrote:
> > > On 2019-09-11 17:57:27 [+0100], Scott Wood wrote:
> > > > diff --git a/kernel/cpu.c b/kernel/cpu.c
> > > > index 885a195dfbe0..32c6175b63b6 100644
> > > > --- a/kernel/cpu.c
> > > > +++ b/kernel/cpu.c
> > > > @@ -308,7 +308,9 @@ void pin_current_cpu(void)
> > > > preempt_lazy_enable();
> > > > preempt_enable();
> > > >
> > > > + rt_invol_sleep_inc();
> > > > __read_rt_lock(cpuhp_pin);
> > > > + rt_invol_sleep_dec();
> > > >
> > > > preempt_disable();
> > > > preempt_lazy_disable();
> > >
> > > I understand the other one. But now looking at it, both end up in
> > > rt_spin_lock_slowlock_locked() which would be the proper place to do
> > > that annotation. Okay.
> >
> > FWIW, if my lazy migrate patchset is accepted, then there will be no users
> > of __read_rt_lock() outside rwlock-rt.c and it'll be moot.
>
> I missed the "both" -- which is the "other one" that ends up in
> rt_spin_lock_slowlock_locked()? stop_one_cpu() doesn't...
That one used here:
__read_rt_lock()
-> rt_spin_lock_slowlock_locked()
The official one (including the write part):
rt_read_lock() (annotation)
-> do_read_rt_lock()
-> __read_rt_lock()
-> rt_spin_lock_slowlock_locked()
and the only missing to the party of sleeping locks is:
rt_spin_lock() (annotation)
-> rt_spin_lock_slowlock()
-> rt_spin_lock_slowlock_locked()
> -Scott
Sebastian
Powered by blists - more mailing lists