mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status
commit5d317b2b6536592a9b51fe65faed43d65ca9158e
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Fri, 6 Nov 2015 02:47:14 +0000 (5 18:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (5 19:34 -0800)
treef6d51677a577802ddd873c2e01bf04c5aff1e3f1
parent25ee01a2fca02dfb5a3ce316e77910c468108199
mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status

Currently there's no easy way to get per-process usage of hugetlb pages,
which is inconvenient because userspace applications which use hugetlb
typically want to control their processes on the basis of how much memory
(including hugetlb) they use.  So this patch simply provides easy access
to the info via /proc/PID/status.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Joern Engel <joern@logfs.org>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/filesystems/proc.txt
fs/proc/task_mmu.c
include/linux/hugetlb.h
include/linux/mm_types.h
mm/hugetlb.c
mm/rmap.c