[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190826152523.dcjbsgyyir4zjdol@linutronix.de>
Date: Mon, 26 Aug 2019 17:25:23 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: Scott Wood <swood@...hat.com>, linux-rt-users@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Paul E . McKenney" <paulmck@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Clark Williams <williams@...hat.com>
Subject: Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to
indicate involuntary sleep
On 2019-08-23 23:10:14 [-0400], Joel Fernandes wrote:
> On Fri, Aug 23, 2019 at 02:28:46PM -0500, Scott Wood wrote:
> > On Fri, 2019-08-23 at 18:20 +0200, Sebastian Andrzej Siewior wrote:
> > >
> > > this looks like an ugly hack. This sleeping_lock_inc() is used where we
> > > actually hold a sleeping lock and schedule() which is okay. But this
> > > would mean we hold a RCU lock and schedule() anyway. Is that okay?
> >
> > Perhaps the name should be changed, but the concept is the same -- RT-
> > specific sleeping which should be considered involuntary for the purpose of
> > debug checks. Voluntary sleeping is not allowed in an RCU critical section
> > because it will break the critical section on certain flavors of RCU, but
> > that doesn't apply to the flavor used on RT. Sleeping for a long time in an
> > RCU critical section would also be a bad thing, but that also doesn't apply
> > here.
>
> I think the name should definitely be changed. At best, it is super confusing to
> call it "sleeping_lock" for this scenario. In fact here, you are not even
> blocking on a lock.
>
> Maybe "sleeping_allowed" or some such.
The mechanism that is used here may change in future. I just wanted to
make sure that from RCU's side it is okay to schedule here.
> thanks,
>
> - Joel
Sebastian
Powered by blists - more mailing lists