[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250922145045.afc6593b4e91c55d8edefabb@linux-foundation.org>
Date: Mon, 22 Sep 2025 14:50:45 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Julian Sun
<sunjunchao@...edance.com>, cgroups@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz,
mingo@...hat.com, juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, lance.yang@...ux.dev,
mhiramat@...nel.org, agruenba@...hat.com, hannes@...xchg.org,
mhocko@...nel.org, roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev
Subject: Re: [PATCH 0/3] Suppress undesirable hung task warnings.
On Mon, 22 Sep 2025 11:08:32 -0700 Christoph Hellwig <hch@...radead.org> wrote:
> On Mon, Sep 22, 2025 at 03:27:18PM +0200, Peter Zijlstra wrote:
> > > 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.
> >
> > This is all quite terrible. I'm not at all sure why a task that is
> > genuinely not making progress and isn't killable should not be reported.
>
> The hung device detector is way to aggressive for very slow I/O.
> See blk_wait_io, which has been around for a long time to work
> around just that. Given that this series targets writeback I suspect
> it is about an overloaded device as well.
Yup, it's writeback - the bug report is in
https://lkml.kernel.org/r/20250917212959.355656-1-sunjunchao@bytedance.com
Memory is big and storage is slow, there's nothing wrong if a task
which is designed to wait for writeback waits for a long time.
Of course, there's something wrong if some other task which isn't
designed to wait for writeback gets stuck waiting for the task which
*is* designed to wait for writeback, but we'll still warn about that.
Regarding an implementation, I'm wondering if we can put a flag in
`struct completion' telling the hung task detector that this one is
expected to wait for long periods sometimes. Probably messy and it
only works for completions (not semaphores, mutexes, etc). Just
putting it out there ;)
Powered by blists - more mailing lists