public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Fengguang Wu <wfg@mail.ustc.edu.cn>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, David Chinner <dgc@sgi.com>,
	Ken Chen <kenchen@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michael Rubin <mrubin@google.com>
Subject: Re: [PATCH 4/5] writeback: remove pages_skipped accounting in __block_write_full_page()
Date: Wed, 3 Oct 2007 07:55:18 +1000	[thread overview]
Message-ID: <20071002215518.GK995458@sgi.com> (raw)
In-Reply-To: <20071002090254.873023041@mail.ustc.edu.cn>

> 
> do not quite agree with each other. The page writeback should be skipped for
> 'locked buffer', but here it is 'clean buffer'!

Ok, so that means we need an equivalent fix in xfs_start_page_writeback()
as it will skip pages with clean buffers just like this. Something like
this (untested)?

---
 fs/xfs/linux-2.6/xfs_aops.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_aops.c	2007-10-02 16:12:56.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_aops.c	2007-10-03 07:53:27.866602431 +1000
@@ -420,10 +420,9 @@ xfs_start_page_writeback(
 		clear_page_dirty_for_io(page);
 	set_page_writeback(page);
 	unlock_page(page);
-	if (!buffers) {
+	/* If no buffers on the page are to be written, finish it here */
+	if (!buffers)
 		end_page_writeback(page);
-		wbc->pages_skipped++;	/* We didn't write this page */
-	}
 }
 
 static inline int bio_add_buffer(struct bio *bio, struct buffer_head *bh)

-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


  parent reply	other threads:[~2007-10-02 21:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071002084143.110486039@mail.ustc.edu.cn>
2007-10-02  8:41 ` [PATCH 0/5] sluggish writeback fixes Fengguang Wu
2007-10-03 11:04   ` Martin Knoblauch
     [not found] ` <20071002090254.489150786@mail.ustc.edu.cn>
2007-10-02  8:41   ` [PATCH 1/5] revert check_dirty_inode_list.patch Fengguang Wu
     [not found] ` <20071002090254.596842343@mail.ustc.edu.cn>
2007-10-02  8:41   ` [PATCH 2/5] writeback: fix time ordering of the per superblock inode lists 8 Fengguang Wu
     [not found] ` <20071002090254.728493507@mail.ustc.edu.cn>
2007-10-02  8:41   ` [PATCH 3/5] writeback: fix ntfs with sb_has_dirty_inodes() Fengguang Wu
     [not found] ` <20071002090254.987182999@mail.ustc.edu.cn>
2007-10-02  8:41   ` [PATCH 5/5] writeback: introduce writeback_control.more_io to indicate more io Fengguang Wu
2007-10-02 21:47   ` David Chinner
     [not found]     ` <20071003013439.GA6501@mail.ustc.edu.cn>
2007-10-03  1:34       ` Fengguang Wu
2007-10-03  2:41       ` David Chinner
     [not found]         ` <20071004022133.GA6244@mail.ustc.edu.cn>
2007-10-04  2:21           ` Fengguang Wu
2007-10-04  5:03           ` David Chinner
     [not found]             ` <20071005033652.GA6448@mail.ustc.edu.cn>
2007-10-05  3:36               ` Fengguang Wu
2007-10-05  7:41               ` David Chinner
     [not found]                 ` <20071005115508.GA9998@mail.ustc.edu.cn>
2007-10-05 11:55                   ` Fengguang Wu
     [not found] ` <20071002090254.873023041@mail.ustc.edu.cn>
2007-10-02  8:41   ` [PATCH 4/5] writeback: remove pages_skipped accounting in __block_write_full_page() Fengguang Wu
2007-10-04 21:26     ` Andrew Morton
2007-10-02 21:55   ` David Chinner [this message]
     [not found]     ` <20071003014333.GB6501@mail.ustc.edu.cn>
2007-10-03  1:43       ` Fengguang Wu
2007-10-03  2:22       ` David Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071002215518.GK995458@sgi.com \
    --to=dgc@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=akpm@osdl.org \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrubin@google.com \
    --cc=wfg@mail.ustc.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox