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

Peter Zijlstra
2007-03-26T13:30:35Z

On Mon, 2007-03-26 at 02:08 -0800, Andrew Morton wrote:
> On Mon, 26 Mar 2007 11:32:47 +0200 Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> > Stopping writers which have idle queues is completely unproductive,
> > and that is basically what the current algorithm does.
>
> This is because the kernel permits all of its allotment of dirty+writeback
> pages to be dirty+writeback against a single device.
>
> A good way of solving the one-device-starves-another-one problem is to
> dynamically adjust the per-device dirty+writeback levels so that (for
> example) if two devices are being written to, each gets 50% of the
> allotment.

This is exactly what happens with my patch if both devices write at the
same speed. (Or at least, that is what is supposed to happen ;-)