maps4: add /proc/kpagecount interface
commit161f47bf41c5ece90ac53cbb6a4cb9bf74ce0ef6
authorMatt Mackall <mpm@selenic.com>
Tue, 5 Feb 2008 06:29:05 +0000 (4 22:29 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 5 Feb 2008 17:44:17 +0000 (5 09:44 -0800)
treef6f18c3eb74faf8b2b8de27b42241e9986bd6dc9
parent85863e475e59afb027b0113290e3796ee6020b7d
maps4: add /proc/kpagecount interface

This makes physical page map counts available to userspace. Together
with /proc/pid/pagemap and /proc/pid/clear_refs, this can be used to
monitor memory usage on a per-page basis.

[akpm@linux-foundation.org: remove unneeded access_ok()]
[bunk@stusta.de: make struct proc_kpagemap static]
Signed-off-by: Matt Mackall <mpm@selenic.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/proc_misc.c