On Mon, Aug 23, 2010 at 10:10:37PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
>
> During data integrity (WB_SYNC_ALL) writeback, wbc->nr_to_write will
> go negative on inodes with more than 1024 dirty pages due to
> implementation details of write_cache_pages(). Currently XFS will
> abort page clustering in writeback once nr_to_write drops below
> zero, and so for data integrity writeback we will do very
> inefficient page at a time allocation and IO submission for inodes
> with large numbers of dirty pages.
>
> Fix this by only aborting the page clustering code when
> wbc->nr_to_write is negative and the sync mode is WB_SYNC_NONE.
Looks okay, but I wonder why if we should remove the check entirely.
We're clustering inside the same extent, and we already have a cap
for the extent size. That means the additional I/O basically is for
free and we really shouldn't let the writeback code restrict us here.
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
|