Re: [RESEND x3][PATCH v12 2/7] locking/mutex: Make mutex::wait_lock irq safe

From: Peter Zijlstra
Date: Thu Oct 10 2024 - 10:06:48 EST


On Thu, Oct 10, 2024 at 10:00:45AM -0400, Steven Rostedt wrote:
> On Wed, 9 Oct 2024 16:53:35 -0700
> John Stultz <jstultz@xxxxxxxxxx> wrote:
>
> > From: Juri Lelli <juri.lelli@xxxxxxxxxx>
> >
> > 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?

Very similar to what we do for rt_mutex during PI; we'll want to look at
mutex_owner during the block chain walk, and holding wait_lock ensures
objects persistence.