[Top] [All Lists]

Re: [PATCH] xfs: handle negative wbc->nr_to_write during sync writeback

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: handle negative wbc->nr_to_write during sync writeback
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 23 Aug 2010 09:28:29 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1282565437-13880-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1282565437-13880-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-08-17)
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>

<Prev in Thread] Current Thread [Next in Thread>