From: Boqun Feng <boqun.feng@gmail.com>
To: Lance Yang <ioworker0@gmail.com>
Cc: akpm@linux-foundation.org, will@kernel.org, peterz@infradead.org,
mingo@redhat.com, longman@redhat.com, mhiramat@kernel.org,
anna.schumaker@oracle.com, joel.granados@kernel.org,
kent.overstreet@linux.dev, leonylgao@tencent.com,
linux-kernel@vger.kernel.org, rostedt@goodmis.org,
senozhatsky@chromium.org, tfiga@chromium.org,
amaindex@outlook.com, John Stultz <jstultz@google.com>
Subject: Re: [PATCH RESEND v2 0/3] hung_task: extend blocking task stacktrace dump to semaphore
Date: Fri, 14 Mar 2025 10:37:54 -0700 [thread overview]
Message-ID: <67d46976.050a0220.13a4aa.9cf4@mx.google.com> (raw)
In-Reply-To: <20250314144300.32542-1-ioworker0@gmail.com>
Hi Lance,
On Fri, Mar 14, 2025 at 10:42:57PM +0800, Lance Yang wrote:
> Hi all,
>
> Inspired by mutex blocker tracking[1], this patch series extend the
> feature to not only dump the blocker task holding a mutex but also to
> support semaphores. Unlike mutexes, semaphores lack explicit ownership
> tracking, making it challenging to identify the root cause of hangs. To
> address this, we introduce a last_holder field to the semaphore structure,
> which is updated when a task successfully calls down() and cleared during
> up().
>
> The assumption is that if a task is blocked on a semaphore, the holders
> must not have released it. While this does not guarantee that the last
> holder is one of the current blockers, it likely provides a practical hint
> for diagnosing semaphore-related stalls.
>
Could you copy John Stultz for the future versions? Because John is
working on proxy execution, which will make a task always track which
mutex it's blocked by:
https://lore.kernel.org/lkml/20250312221147.1865364-3-jstultz@google.com/
I feel it's better to build the hung task detection with that in mind,
thanks!
Regards,
Boqun
[...]
next prev parent reply other threads:[~2025-03-14 17:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 14:42 [PATCH RESEND v2 0/3] hung_task: extend blocking task stacktrace dump to semaphore Lance Yang
2025-03-14 14:42 ` [PATCH RESEND v2 1/3] hung_task: replace blocker_mutex with encoded blocker Lance Yang
2025-03-18 9:41 ` Masami Hiramatsu
2025-03-18 11:35 ` Lance Yang
2025-03-14 14:42 ` [PATCH RESEND v2 2/3] hung_task: show the blocker task if the task is hung on semaphore Lance Yang
2025-03-19 11:55 ` Masami Hiramatsu
2025-03-19 12:11 ` Lance Yang
2025-03-14 14:43 ` [PATCH RESEND v2 3/3] samples: add hung_task detector semaphore blocking sample Lance Yang
2025-03-18 1:36 ` Masami Hiramatsu
2025-03-18 6:20 ` Amaindex
2025-03-14 17:37 ` Boqun Feng [this message]
2025-03-15 3:18 ` [PATCH RESEND v2 0/3] hung_task: extend blocking task stacktrace dump to semaphore Lance Yang
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=67d46976.050a0220.13a4aa.9cf4@mx.google.com \
--to=boqun.feng@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amaindex@outlook.com \
--cc=anna.schumaker@oracle.com \
--cc=ioworker0@gmail.com \
--cc=joel.granados@kernel.org \
--cc=jstultz@google.com \
--cc=kent.overstreet@linux.dev \
--cc=leonylgao@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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