kernel-fxtec-pro1x/fs/ncpfs
Ying Han 456f998ec8 memcg: add the pagefault count into memcg stats
Two new stats in per-memcg memory.stat which tracks the number of page
faults and number of major page faults.

  "pgfault"
  "pgmajfault"

They are different from "pgpgin"/"pgpgout" stat which count number of
pages charged/discharged to the cgroup and have no meaning of reading/
writing page to disk.

It is valuable to track the two stats for both measuring application's
performance as well as the efficiency of the kernel page reclaim path.
Counting pagefaults per process is useful, but we also need the aggregated
value since processes are monitored and controlled in cgroup basis in
memcg.

Functional test: check the total number of pgfault/pgmajfault of all
memcgs and compare with global vmstat value:

  $ cat /proc/vmstat | grep fault
  pgfault 1070751
  pgmajfault 553

  $ cat /dev/cgroup/memory.stat | grep fault
  pgfault 1071138
  pgmajfault 553
  total_pgfault 1071142
  total_pgmajfault 553

  $ cat /dev/cgroup/A/memory.stat | grep fault
  pgfault 199
  pgmajfault 0
  total_pgfault 199
  total_pgmajfault 0

Performance test: run page fault test(pft) wit 16 thread on faulting in
15G anon pages in 16G container.  There is no regression noticed on the
"flt/cpu/s"

Sample output from pft:

  TAG pft:anon-sys-default:
    Gb  Thr CLine   User     System     Wall    flt/cpu/s fault/wsec
    15   16   1     0.67s   233.41s    14.76s   16798.546 266356.260

  +-------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x  10     16682.962     17344.027     16913.524     16928.812      166.5362
  +  10     16695.568     16923.896     16820.604     16824.652     84.816568
  No difference proven at 95.0% confidence

[akpm@linux-foundation.org: fix build]
[hughd@google.com: shmem fix]
Signed-off-by: Ying Han <yinghan@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-26 17:12:36 -07:00
..
dir.c vfs: push dentry_unhash on rename_dir into file systems 2011-05-26 07:26:48 -04:00
file.c move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
getopt.c fs/ncpfs/getopt.c: cleanup keneldoc 2009-01-06 15:59:19 -08:00
getopt.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c fs/ncpfs/inode.c: suppress used-uninitialised warning 2011-05-25 08:39:56 -07:00
ioctl.c move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
Kconfig fs/Kconfig: move the rest of ncpfs out 2009-01-22 13:16:01 +03:00
Makefile fs: change to new flag variable 2011-03-17 14:02:57 +01:00
mmap.c memcg: add the pagefault count into memcg stats 2011-05-26 17:12:36 -07:00
ncp_fs.h move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
ncp_fs_i.h move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
ncp_fs_sb.h move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
ncplib_kernel.c move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
ncplib_kernel.h move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
ncpsign_kernel.c move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
ncpsign_kernel.h move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
sock.c move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00
symlink.c move internal-only parts of ncpfs headers to fs/ncpfs 2011-01-12 20:03:43 -05:00