Re: [PATCH 5/5] writeback: introduce writeback_control.more_io to indicate more io

David Chinner
2007-10-02T21:48:18Z

On Tue, Oct 02, 2007 at 04:41:48PM +0800, Fengguang Wu wrote:
> wbc.pages_skipped = 0;
> @@ -560,8 +561,9 @@ static void background_writeout(unsigned
> min_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;
> if (wbc.nr_to_write > 0 || wbc.pages_skipped > 0) {
> /* Wrote less than expected */
> - congestion_wait(WRITE, HZ/10);
> - if (!wbc.encountered_congestion)
> + if (wbc.encountered_congestion || wbc.more_io)
> + congestion_wait(WRITE, HZ/10);
> + else
> break;
> }

Why do you call congestion_wait() if there is more I/O to issue? If
we have a fast filesystem, this might cause the device queues to
fill, then drain on congestion_wait(), then fill again, etc. i.e. we
will have trouble keeping the queues full, right?

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group