[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250219204153.65ed1f5e@gandalf.local.home>
Date: Wed, 19 Feb 2025 20:41:53 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Waiman Long <llong@...hat.com>
Cc: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>, Peter Zijlstra
<peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Will Deacon
<will@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Boqun Feng
<boqun.feng@...il.com>, Joel Granados <joel.granados@...nel.org>, Anna
Schumaker <anna.schumaker@...cle.com>, Lance Yang <ioworker0@...il.com>,
Kent Overstreet <kent.overstreet@...ux.dev>, Yongliang Gao
<leonylgao@...cent.com>, Tomasz Figa <tfiga@...omium.org>, Sergey
Senozhatsky <senozhatsky@...omium.org>, linux-kernel@...r.kernel.org, Linux
Memory Management List <linux-mm@...ck.org>
Subject: Re: [PATCH 1/2] hung_task: Show the blocker task if the task is
hung on mutex
On Wed, 19 Feb 2025 20:36:13 -0500
Waiman Long <llong@...hat.com> wrote:
> >>>> this field, we don't need to take lock, though taking the wait_lock may
> >>>> still be needed to examine other information inside the mutex.
> > Do we need to take it just for accessing owner, which is in an atomic?
>
> Right. I forgot it is an atomic_long_t. In that case, no lock should be
> needed.
Now if we have a two fields to read:
block_flags (for the type of lock) and blocked_on (for the lock)
We need a way to synchronize the two. What happens if we read the type, and
the task wakes up and and then blocks on a different type of lock?
Then the lock read from blocked_on could be a different type of lock than
what is expected.
-- Steve
Powered by blists - more mailing lists