Re: [External] Re: [PATCH 0/3] Suppress undesirable hung task warnings.

From: Julian Sun

Date: Mon Sep 22 2025 - 10:24:29 EST


On Mon, Sep 22, 2025 at 9:07 PM Michal Hocko <mhocko@xxxxxxxx> wrote:
>
> On Mon 22-09-25 17:41:43, Julian Sun wrote:
> > As suggested by Andrew Morton in [1], we need a general mechanism
>
> what is the reference?

Sorry, the link is:
https://lore.kernel.org/cgroups/20250917152155.5a8ddb3e4ff813289ea0b4c9@xxxxxxxxxxxxxxxxxxxx/
>
> > that allows the hung task detector to ignore unnecessary hung
> > tasks. This patch set implements this functionality.
> >
> > Patch 1 introduces a PF_DONT_HUNG flag. The hung task detector will
> > ignores all tasks that have the PF_DONT_HUNG flag set.
> >
> > Patch 2 introduces wait_event_no_hung() and wb_wait_for_completion_no_hung(),
> > which enable the hung task detector to ignore hung tasks caused by these
> > wait events.
> >
> > Patch 3 uses wb_wait_for_completion_no_hung() in the final phase of memcg
> > teardown to eliminate the hung task warning.
> >
> > Julian Sun (3):
> > sched: Introduce a new flag PF_DONT_HUNG.
> > writeback: Introduce wb_wait_for_completion_no_hung().
> > memcg: Don't trigger hung task when memcg is releasing.
> >
> > fs/fs-writeback.c | 15 +++++++++++++++
> > include/linux/backing-dev.h | 1 +
> > include/linux/sched.h | 12 +++++++++++-
> > include/linux/wait.h | 15 +++++++++++++++
> > kernel/hung_task.c | 6 ++++++
> > mm/memcontrol.c | 2 +-
> > 6 files changed, 49 insertions(+), 2 deletions(-)
> >
> > --
> > 2.39.5
>
> --
> Michal Hocko
> SUSE Labs


Thanks,
--
Julian Sun <sunjunchao@xxxxxxxxxxxxx>