Re: [PATCH 2/4] writeback: name the bdi in the slow writeback report

From: Breno Leitao

Date: Fri Nov 06 2026 - 11:00:25 EST


On Fri, Nov 06, 2026 at 03:27:49PM +0100, Jan Kara wrote:
> On Fri 06-11-26 04:26:32, Breno Leitao wrote:
> > The slow writeback report names the waiting task and how long it has
> > waited, but not what it is waiting on. On a machine with several
> > filesystems there is no way to tell which device is slow.
> >
> > Pass the bdi to wb_wait_for_completion() and print its name on a second
> > line, together with the number of work items still outstanding. A sync
> > issues one work item per cgroup wb with dirty inodes, so the count also
> > shows whether a single cgroup is holding up the others.
> >
> > wb_wait_for_completion() took the bdi until commit 5b9cce4c7eb0
> > ("writeback: Generalize and expose wb_completion") made it usable for
> > the memcg foreign flushes. memcg tracks those by bdi id only and passes
> > NULL, which bdi_dev_name() prints as "(unknown)".
> >
> > The first line does not change, so anything matching on it keeps
> > working. A sync on a throttled null_blk device now reports:
> >
> > INFO: The task sync:180 has been waiting for writeback completion for more than 28 seconds.
> > bdi 252:0, work items left: 1
> >
> > Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
>
> Dunno, I'd put everything on one line. Otherwise things can get interleaved
> by other messages. Kernel messages are not really an ABI, we can change
> them...

Ack!

I will get them in a single line and respin,

--breno