Re: [patch 1/3] fix illogical behavior in balance_dirty_pages()

Miklos Szeredi
2007-03-25T11:13:26Z

> On Sat, 2007-03-24 at 22:55 +0100, Miklos Szeredi wrote:
> > This is a slightly different take on the fix for the deadlock in fuse
> > with dirty balancing. David Chinner convinced me, that per-bdi
> > counters are too expensive, and that it's not worth trying to account
> > the number of pages under writeback, as they will be limited by the
> > queue anyway.
> >
>
> Please have a look at this:
> http://lkml.org/lkml/2007/3/19/220

> + if (bdi_nr_reclaimable + bdi_stat(bdi, BDI_WRITEBACK) <=
> + bdi_thresh)
> + break;
>

Yes, this will resolve the deadlock as well, where balance_dirty_pages()
is currently looping forever with:

bdi_nr_reclaimable + bdi_stat(bdi, BDI_WRITEBACK) == 0

Thanks,
Miklos