kernel-fxtec-pro1x/fs/nilfs2
Michael Rubin f629d1c9bd mm: add account_page_writeback()
To help developers and applications gain visibility into writeback
behaviour this patch adds two counters to /proc/vmstat.

  # grep nr_dirtied /proc/vmstat
  nr_dirtied 3747
  # grep nr_written /proc/vmstat
  nr_written 3618

These entries allow user apps to understand writeback behaviour over time
and learn how it is impacting their performance.  Currently there is no
way to inspect dirty and writeback speed over time.  It's not possible for
nr_dirty/nr_writeback.

These entries are necessary to give visibility into writeback behaviour.
We have /proc/diskstats which lets us understand the io in the block
layer.  We have blktrace for more in depth understanding.  We have
e2fsprogs and debugsfs to give insight into the file systems behaviour,
but we don't offer our users the ability understand what writeback is
doing.  There is no way to know how active it is over the whole system, if
it's falling behind or to quantify it's efforts.  With these values
exported users can easily see how much data applications are sending
through writeback and also at what rates writeback is processing this
data.  Comparing the rates of change between the two allow developers to
see when writeback is not able to keep up with incoming traffic and the
rate of dirty memory being sent to the IO back end.  This allows folks to
understand their io workloads and track kernel issues.  Non kernel
engineers at Google often use these counters to solve puzzling performance
problems.

Patch #4 adds a pernode vmstat file with nr_dirtied and nr_written

Patch #5 add writeback thresholds to /proc/vmstat

Currently these values are in debugfs. But they should be promoted to
/proc since they are useful for developers who are writing databases
and file servers and are not debugging the kernel.

The output is as below:

 # grep threshold /proc/vmstat
 nr_pages_dirty_threshold 409111
 nr_pages_dirty_background_threshold 818223

This patch:

This allows code outside of the mm core to safely manipulate page
writeback state and not worry about the other accounting.  Not using these
routines means that some code will lose track of the accounting and we get
bugs.

Modify nilfs2 to use interface.

Signed-off-by: Michael Rubin <mrubin@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
Cc: Jiro SEKIBA <jir@unicus.jp>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:06 -07:00
..
alloc.c nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
alloc.h nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
bmap.c nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
bmap.h nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
btnode.c nilfs2: add routines to roll back state of DAT file 2010-10-23 09:24:37 +09:00
btnode.h nilfs2: add read ahead mode to nilfs_btnode_submit_block 2010-07-23 10:02:15 +09:00
btree.c nilfs2: apply read-ahead for nilfs_btree_lookup_contig 2010-07-23 10:02:16 +09:00
btree.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
cpfile.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
cpfile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dat.c nilfs2: eliminate sparse warnings - "symbol not declared" 2010-10-23 09:24:40 +09:00
dat.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-08-10 11:26:52 -07:00
direct.c nilfs2: remove redundant pointer checks in bmap lookup functions 2010-07-23 10:02:14 +09:00
direct.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
export.h nilfs2: make snapshots in checkpoint tree exportable 2010-10-23 09:24:34 +09:00
file.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
gcinode.c nilfs2: do not allocate nilfs_mdt_info structure to gc-inodes 2010-10-23 09:24:37 +09:00
ifile.c nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
ifile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
inode.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
ioctl.c nilfs2: add bdev freeze/thaw support 2010-10-23 09:24:39 +09:00
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
mdt.c nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00
mdt.h nilfs2: remove own inode allocator and destructor for metadata files 2010-10-23 09:24:39 +09:00
namei.c nilfs2: deny write access to inodes in snapshots 2010-10-23 09:24:35 +09:00
nilfs.h nilfs2: remove own inode allocator and destructor for metadata files 2010-10-23 09:24:39 +09:00
page.c nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
page.h nilfs2: add routines to redirect access to buffers of DAT file 2010-10-23 09:24:37 +09:00
recovery.c nilfs2: get rid of back pointer to writable sb instance 2010-10-23 09:24:38 +09:00
sb.h nilfs2: do not allocate multiple super block instances for a device 2010-10-23 09:24:36 +09:00
segbuf.c nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c mm: add account_page_writeback() 2010-10-26 16:52:06 -07:00
segment.h nilfs2: use root object to get ifile 2010-10-23 09:24:35 +09:00
sufile.c nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
sufile.h nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
super.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 2010-10-23 01:26:47 -07:00
the_nilfs.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 2010-10-23 01:26:47 -07:00
the_nilfs.h nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00