Re: [RFC PATCH] hung_task: Dump blocker task if it is not hung
From: Google
Date: Wed Jul 30 2025 - 09:56:28 EST
On Wed, 30 Jul 2025 22:28:45 +0900
Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> wrote:
> On (25/07/30 18:53), Masami Hiramatsu (Google) wrote:
> > From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> >
> > Dump the lock blocker task if it is not hung because if the blocker
> > task is also hung, it should be dumped by the detector. This will
> > de-duplicate the same stackdumps if the blocker task is also blocked
> > by another task (and hung).
>
> [..]
>
> > #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
> > -static void debug_show_blocker(struct task_struct *task)
> > +static void debug_show_blocker(struct task_struct *task, unsigned long timeout)
> > {
> > struct task_struct *g, *t;
> > unsigned long owner, blocker, blocker_type;
> > @@ -153,41 +193,21 @@ static void debug_show_blocker(struct task_struct *task)
> > task->comm, task->pid, t->comm, t->pid);
> > break;
> > }
> > - sched_show_task(t);
> > + /* Avoid duplicated task dump, skip if the task is also hung. */
> > + if (!task_is_hung(t, timeout))
> > + sched_show_task(t);
> > return;
> > }
>
> This patch seems to be against the tree that is significantly
> behind the current linux-next. Namely it's in conflict with
> linux-next's commit 77da18de55ac6.
Ah, yes. I just used v6.16 for testing. OK, let me update it
against the linux-next.
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>