From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 3/5] writeback: nr_dirtied and nr_written in /proc/vmstat Date: Mon, 13 Sep 2010 14:20:17 -0700 Message-ID: <20100913142017.2a426365.akpm@linux-foundation.org> References: <1284357493-20078-1-git-send-email-mrubin@google.com> <1284357493-20078-4-git-send-email-mrubin@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, fengguang.wu@intel.com, jack@suse.cz, riel@redhat.com, david@fromorbit.com, kosaki.motohiro@jp.fujitsu.com, npiggin@kernel.dk, hch@lst.de, axboe@kernel.dk To: Michael Rubin Return-path: In-Reply-To: <1284357493-20078-4-git-send-email-mrubin@google.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Sun, 12 Sep 2010 22:58:11 -0700 Michael Rubin wrote: > To help developers and applications gain visibility into writeback > behaviour adding two entries to vm_stat_items and /proc/vmstat. This > will allow us to track the "written" and "dirtied" counts. > > # grep nr_dirtied /proc/vmstat > nr_dirtied 3747 > # grep nr_written /proc/vmstat > nr_written 3618 > > Signed-off-by: Michael Rubin > Reviewed-by: Wu Fengguang > --- > include/linux/mmzone.h | 2 ++ > mm/page-writeback.c | 2 ++ > mm/vmstat.c | 3 +++ > 3 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 6e6e626..d0d7454 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -104,6 +104,8 @@ enum zone_stat_item { > NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */ > NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */ > NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ > + NR_FILE_DIRTIED, /* accumulated dirty pages */ > + NR_WRITTEN, /* accumulated written pages */ I think we can make those comments less ambiguous> --- a/include/linux/mmzone.h +++ a/include/linux/mmzone.h @@ -104,8 +104,8 @@ enum zone_stat_item { NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */ NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */ NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ - NR_FILE_DIRTIED, /* accumulated dirty pages */ - NR_WRITTEN, /* accumulated written pages */ + NR_FILE_DIRTIED, /* page dirtyings since bootup */ + NR_WRITTEN, /* page writings since bootup */ #ifdef CONFIG_NUMA NUMA_HIT, /* allocated in intended node */ NUMA_MISS, /* allocated in non intended node */ > > ... > > index f389168..d448ef4 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -732,6 +732,9 @@ static const char * const vmstat_text[] = { > "nr_isolated_anon", > "nr_isolated_file", > "nr_shmem", > + "nr_dirtied", > + "nr_written", > + The mismatch between "NR_FILE_DIRTIED" and "nr_dirtied" is a bit, umm, dirty. I can kinda see the logic in the naming but still.. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org