alistair23-linux/fs/proc
Rafael Aquini 198d1597cc fs: proc: task_mmu: show page size in /proc/<pid>/numa_maps
The output of /proc/$pid/numa_maps is in terms of number of pages like
anon=22 or dirty=54.  Here's some output:

  7f4680000000 default file=/hugetlb/bigfile anon=50 dirty=50 N0=50
  7f7659600000 default file=/anon_hugepage\040(deleted) anon=50 dirty=50 N0=50
  7fff8d425000 default stack anon=50 dirty=50 N0=50

Looks like we have a stack and a couple of anonymous hugetlbfs
areas page which both use the same amount of memory.  They don't.

The 'bigfile' uses 1GB pages and takes up ~50GB of space.  The
anon_hugepage uses 2MB pages and takes up ~100MB of space while the stack
uses normal 4k pages.  You can go over to smaps to figure out what the
page size _really_ is with KernelPageSize or MMUPageSize.  But, I think
this is a pretty nasty and counterintuitive interface as it stands.

This patch introduces 'kernelpagesize_kB' line element to
/proc/<pid>/numa_maps report file in order to help identifying the size of
pages that are backing memory areas mapped by a given task.  This is
specially useful to help differentiating between HUGE and GIGANTIC page
backed VMAs.

This patch is based on Dave Hansen's proposal and reviewer's follow-ups
taken from the following dicussion threads:
 * https://lkml.org/lkml/2011/9/21/454
 * https://lkml.org/lkml/2014/12/20/66

Signed-off-by: Rafael Aquini <aquini@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-12 18:54:12 -08:00
..
array.c proc: task_state: ptrace_parent() doesn't need pid_alive() check 2014-12-10 17:41:09 -08:00
base.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2014-12-17 12:31:40 -08:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
fd.c
fd.h
generic.c fs: proc: use PDE() to get proc_dir_entry 2015-02-12 18:54:12 -08:00
inode.c fs: proc: use PDE() to get proc_dir_entry 2015-02-12 18:54:12 -08:00
internal.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-12-16 15:53:03 -08:00
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c fs/proc/meminfo.c: include cma info in proc/meminfo 2014-12-18 19:08:10 -08:00
namespaces.c kill proc_ns completely 2014-12-10 21:30:57 -05:00
nommu.c
page.c mm:add KPF_ZERO_PAGE flag for /proc/kpageflags 2015-02-11 17:06:00 -08:00
proc_net.c fs/proc: use a rb tree for the directory entries 2014-12-10 17:41:09 -08:00
proc_sysctl.c
proc_tty.c
root.c fs/proc: use a rb tree for the directory entries 2014-12-10 17:41:09 -08:00
self.c
softirqs.c
stat.c genirq: Prevent proc race against freeing of irq descriptors 2014-12-13 13:33:07 +01:00
task_mmu.c fs: proc: task_mmu: show page size in /proc/<pid>/numa_maps 2015-02-12 18:54:12 -08:00
task_nommu.c
thread_self.c
uptime.c
version.c
vmcore.c