xfs
[Top] [All Lists]

Re: [PATCH 03/27] xfs: use write_cache_pages for writeback clustering

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 03/27] xfs: use write_cache_pages for writeback clustering
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 11 Jul 2011 06:26:09 -0400
Cc: Mel Gorman <mgorman@xxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Johannes Weiner <jweiner@xxxxxxxxxx>, Wu Fengguang <fengguang.wu@xxxxxxxxx>, xfs@xxxxxxxxxxx, jack@xxxxxxx, linux-mm@xxxxxxxxx
In-reply-to: <20110702024219.GT561@dastard>
References: <20110629140109.003209430@xxxxxxxxxxxxxxxxxxxxxx> <20110629140336.950805096@xxxxxxxxxxxxxxxxxxxxxx> <20110701022248.GM561@dastard> <20110701041851.GN561@dastard> <20110701093305.GA28531@xxxxxxxxxxxxx> <20110701145935.GB29530@xxxxxxx> <20110702024219.GT561@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Jul 02, 2011 at 12:42:19PM +1000, Dave Chinner wrote:
> To tell the truth, I don't think anyone really cares how ext3
> performs these days. XFS seems to be the filesystem that brings out
> all the bad behaviour in the mm subsystem....

Maybe that's because XFS actually plays by the rules?

btrfs simply rejects all attempts from kswapd to write back, as it
has the following check:

        if (current->flags & PF_MEMALLOC) {
                redirty_page_for_writepage(wbc, page);
                unlock_page(page);
                return 0;
        }

while XFS tries to play nice and allow writeback from kswapd:

        if ((current->flags & (PF_MEMALLOC|PF_KSWAPD)) == PF_MEMALLOC)
                goto redirty;

ext4 can't perform delalloc conversions from writepage:

        if (walk_page_buffers(NULL, page_bufs, 0, len, NULL,
                              ext4_bh_delay_or_unwritten)) {
                /*
                 * We don't want to do block allocation, so redirty
                 * the page and return.  We may reach here when we do
                 * a journal commit via journal_submit_inode_data_buffers.
                 * We can also reach here via shrink_page_list
                 */
                goto redirty_pages;
        }

so any normal worklaods that don't involve overwrites will every get
any writeback from kswapd.

This should tell us that the VM can live just fine without doing
writeback from kswapd, as otherwise all systems using btrfs or ext4
would have completely fallen over.

It also suggested we should have standardized helpers in the VFS to work
around the braindead VM behaviour.

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