[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250219221141.09f9fe48@gandalf.local.home>
Date: Wed, 19 Feb 2025 22:11:41 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Waiman Long <llong@...hat.com>, 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 Thu, 20 Feb 2025 11:40:36 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> Hmm, right.
> Since the blocked_on must be NULL before setting flag, if we can ensure
> the writing order so that blocked_flags is always updated before
> blocked_on, may it be safe?
>
> Or, (this may introduce more memory overhead) don't use union but
> use different blocked_on_mutex, blocked_on_rwsem, etc.
>
> Another idea is to make the owner offset same, like introducing
>
> struct common_lock {
> atomic_long_t owner;
> };
>
> But the problem is that rt_mutex does not use atomic for storing
> the owner. (we can make it atomic using wrapper)
Either that, or add to the task_struct:
struct mutex *blocked_on_mutex;
struct rwsem *blocked_on_rwsem;
struct rtlock *blocked_on_rtlock;
And just have each type assign to its own type. Then you only need to look
at each one. But yeah, this adds even more bloat to task_struct.
:-/
-- Steve
Powered by blists - more mailing lists