[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250407130825.69b4c879b242df4caaf426cf@linux-foundation.org>
Date: Mon, 7 Apr 2025 13:08:25 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Lance Yang <ioworker0@...il.com>
Cc: will@...nel.org, peterz@...radead.org, mingo@...hat.com,
longman@...hat.com, mhiramat@...nel.org, anna.schumaker@...cle.com,
boqun.feng@...il.com, joel.granados@...nel.org, kent.overstreet@...ux.dev,
leonylgao@...cent.com, linux-kernel@...r.kernel.org, rostedt@...dmis.org,
senozhatsky@...omium.org, tfiga@...omium.org, amaindex@...look.com,
jstultz@...gle.com, Mingzhe Yang <mingzhe.yang@...com>
Subject: Re: [PATCH v4 1/3] hung_task: replace blocker_mutex with encoded
blocker
On Thu, 20 Mar 2025 14:49:21 +0800 Lance Yang <ioworker0@...il.com> wrote:
> This patch replaces 'struct mutex *blocker_mutex' with 'unsigned long
> blocker', as only one blocker is active at a time.
>
> The blocker filed can store both the lock addrees and the lock type, with
> LSB used to encode the type as Masami suggested, making it easier to extend
> the feature to cover other types of locks.
>
> Also, once the lock type is determined, we can directly extract the address
> and cast it to a lock pointer ;)
>
> ...
>
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1218,7 +1218,7 @@ struct task_struct {
> #endif
>
> #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
> - struct mutex *blocker_mutex;
> + unsigned long blocker;
-ENOCOMMENT
Powered by blists - more mailing lists