[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091009154510.GI7654@duck.suse.cz>
Date: Fri, 9 Oct 2009 17:45:10 +0200
From: Jan Kara <jack@...e.cz>
To: Wu Fengguang <fengguang.wu@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Theodore Tso <tytso@....edu>,
Christoph Hellwig <hch@...radead.org>,
Dave Chinner <david@...morbit.com>,
Chris Mason <chris.mason@...cle.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Li Shaohua <shaohua.li@...el.com>,
Myklebust Trond <Trond.Myklebust@...app.com>,
"jens.axboe@...cle.com" <jens.axboe@...cle.com>,
Jan Kara <jack@...e.cz>, Nick Piggin <npiggin@...e.de>,
linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 07/45] writeback: dont redirty tail an inode with dirty
pages
On Wed 07-10-09 15:38:25, Wu Fengguang wrote:
> This avoids delaying writeback for an expired (XFS) inode with lots of
> dirty pages, but no active dirtier at the moment.
OK, looks good.
Acked-by: Jan Kara <jack@...e.cz>
Honza
>
> CC: Dave Chinner <david@...morbit.com>
> CC: Christoph Hellwig <hch@...radead.org>
> Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
> ---
> fs/fs-writeback.c | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> --- linux.orig/fs/fs-writeback.c 2009-10-06 23:37:57.000000000 +0800
> +++ linux/fs/fs-writeback.c 2009-10-06 23:38:28.000000000 +0800
> @@ -479,18 +479,7 @@ writeback_single_inode(struct inode *ino
> spin_lock(&inode_lock);
> inode->i_state &= ~I_SYNC;
> if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
> - if ((inode->i_state & I_DIRTY_PAGES) && wbc->for_kupdate) {
> - /*
> - * More pages get dirtied by a fast dirtier.
> - */
> - goto select_queue;
> - } else if (inode->i_state & I_DIRTY) {
> - /*
> - * At least XFS will redirty the inode during the
> - * writeback (delalloc) and on io completion (isize).
> - */
> - redirty_tail(inode);
> - } else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
> + if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
> /*
> * We didn't write back all the pages. nfs_writepages()
> * sometimes bales out without doing anything. Redirty
> @@ -512,7 +501,6 @@ writeback_single_inode(struct inode *ino
> * soon as the queue becomes uncongested.
> */
> inode->i_state |= I_DIRTY_PAGES;
> -select_queue:
> if (wbc->nr_to_write <= 0) {
> /*
> * slice used up: queue for next turn
> @@ -535,6 +523,12 @@ select_queue:
> inode->i_state |= I_DIRTY_PAGES;
> redirty_tail(inode);
> }
> + } else if (inode->i_state & I_DIRTY) {
> + /*
> + * At least XFS will redirty the inode during the
> + * writeback (delalloc) and on io completion (isize).
> + */
> + redirty_tail(inode);
> } else if (atomic_read(&inode->i_count)) {
> /*
> * The inode is clean, inuse
>
>
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists