From: Peter Zijlstra <peterz@infradead.org>
To: ruipengqi <ruipengqi3@gmail.com>
Cc: jaegeuk@kernel.org, chao@kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Lance Yang <ioworker0@gmail.com>,
Mingzhe Yang <mingzhe.yang@ly.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Anna Schumaker <anna.schumaker@oracle.com>,
Boqun Feng <boqun.feng@gmail.com>, Ingo Molnar <mingo@redhat.com>,
Joel Granados <joel.granados@kernel.org>,
John Stultz <jstultz@google.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
Tomasz Figa <tfiga@chromium.org>,
Waiman Long <longman@redhat.com>, Will Deacon <will@kernel.org>,
Yongliang Gao <leonylgao@tencent.com>,
Zi Li <amaindex@outlook.com>
Subject: Re: [PATCH 1/2] hung_task: replace blocker_mutex with encoded blocker
Date: Wed, 25 Mar 2026 14:54:13 +0100 [thread overview]
Message-ID: <20260325135413.GY3738786@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260325133322.1050573-1-ruipengqi3@gmail.com>
I still fully and totally detest all of this :/
On Wed, Mar 25, 2026 at 09:33:22PM +0800, ruipengqi wrote:
> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
> index 555e2b3a665a..61fa97da7989 100644
> --- a/kernel/locking/mutex.c
> +++ b/kernel/locking/mutex.c
> @@ -29,6 +29,7 @@
> #include <linux/interrupt.h>
> #include <linux/debug_locks.h>
> #include <linux/osq_lock.h>
> +#include <linux/hung_task.h>
>
> #define CREATE_TRACE_POINTS
> #include <trace/events/lock.h>
> @@ -191,7 +192,7 @@ __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
> struct list_head *list)
> {
> #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
> - WRITE_ONCE(current->blocker_mutex, lock);
> + hung_task_set_blocker(lock, BLOCKER_TYPE_MUTEX);
> #endif
> debug_mutex_add_waiter(lock, waiter, current);
>
> @@ -209,7 +210,7 @@ __mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter)
>
> debug_mutex_remove_waiter(lock, waiter, current);
> #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
> - WRITE_ONCE(current->blocker_mutex, NULL);
> + hung_task_clear_blocker();
> #endif
Your functions have stubs, you can get rid of those ugly #ifdefs
next prev parent reply other threads:[~2026-03-25 13:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 13:33 [PATCH 1/2] hung_task: replace blocker_mutex with encoded blocker ruipengqi
2026-03-25 13:54 ` Peter Zijlstra [this message]
2026-03-25 14:53 ` Andrew Morton
2026-03-25 15:03 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260325135413.GY3738786@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=amaindex@outlook.com \
--cc=anna.schumaker@oracle.com \
--cc=boqun.feng@gmail.com \
--cc=chao@kernel.org \
--cc=ioworker0@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=joel.granados@kernel.org \
--cc=jstultz@google.com \
--cc=kent.overstreet@linux.dev \
--cc=leonylgao@tencent.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=mingzhe.yang@ly.com \
--cc=rostedt@goodmis.org \
--cc=ruipengqi3@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=tfiga@chromium.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox