[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK1f24=CUe4Ugb8GHb+yTyj692Z1=YK3gO13ABAKJUHWVjWQdw@mail.gmail.com>
Date: Sat, 15 Mar 2025 11:18:29 +0800
From: Lance Yang <ioworker0@...il.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: akpm@...ux-foundation.org, will@...nel.org, peterz@...radead.org,
mingo@...hat.com, longman@...hat.com, mhiramat@...nel.org,
anna.schumaker@...cle.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, John Stultz <jstultz@...gle.com>
Subject: Re: [PATCH RESEND v2 0/3] hung_task: extend blocking task stacktrace
dump to semaphore
On Sat, Mar 15, 2025 at 1:38 AM Boqun Feng <boqun.feng@...il.com> wrote:
>
> 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!
Yeah. Thanks for letting me know. I will keep John in the loop ;)
Thanks,
Lance
>
> Regards,
> Boqun
>
> [...]
Powered by blists - more mailing lists