[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241010223109.68235374@gandalf.local.home>
Date: Thu, 10 Oct 2024 22:31:09 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: John Stultz <jstultz@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Juri Lelli <juri.lelli@...hat.com>,
Joel Fernandes <joelaf@...gle.com>, Qais Yousef <qyousef@...alina.io>, Ingo
Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Vincent
Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann
<dietmar.eggemann@....com>, Valentin Schneider <vschneid@...hat.com>, Ben
Segall <bsegall@...gle.com>, Zimuzo Ezeozue <zezeozue@...gle.com>, Mel
Gorman <mgorman@...e.de>, Will Deacon <will@...nel.org>, Waiman Long
<longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>, "Paul E. McKenney"
<paulmck@...nel.org>, Metin Kaya <Metin.Kaya@....com>, Xuewen Yan
<xuewen.yan94@...il.com>, K Prateek Nayak <kprateek.nayak@....com>, Thomas
Gleixner <tglx@...utronix.de>, Daniel Lezcano <daniel.lezcano@...aro.org>,
kernel-team@...roid.com, "Connor O'Brien" <connoro@...gle.com>
Subject: Re: [RESEND x3][PATCH v12 2/7] locking/mutex: Make mutex::wait_lock
irq safe
On Thu, 10 Oct 2024 19:26:24 -0700
John Stultz <jstultz@...gle.com> wrote:
> On Thu, Oct 10, 2024 at 7:00 AM Steven Rostedt <rostedt@...dmis.org> wrote:
> > On Wed, 9 Oct 2024 16:53:35 -0700
> > John Stultz <jstultz@...gle.com> wrote:
> >
> > > From: Juri Lelli <juri.lelli@...hat.com>
> > >
> > > mutex::wait_lock might be nested under rq->lock.
> > >
> > > Make it irq safe then.
> >
> > Can you expand on this please?
> >
> > If the mutex:wait_lock might be taken under an rq->lock, doesn't that mean
> > a mutex was taken under rq->lock? Or is it something internal?
> >
> > This change log needs to be more explicit.
>
> Sure! Would the following work for you?
>
> "With the proxy-execution series, we traverse the task->mutex->task
> blocked_on/owner chain in the scheduler core. We do this while holding
> the rq::lock to keep the structures in place while taking and
> releasing the alternating lock types.
>
> Since the mutex::wait_lock is one of the locks we will take in this
> way under the rq::lock in the scheduler core, we need to make sure
> that its usage elsewhere is irq safe."
>
> ?
Yes, that explains things much better. ;-)
Thanks!
-- Steve
Powered by blists - more mailing lists