aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/proc.txt
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@suse.de>2010-10-27 18:34:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:13 -0400
commitb40d4f84becd69275451baee7f0801c85eb58437 (patch)
tree78258f7b431a900bf8292d25970dea74b8aa283f /Documentation/filesystems/proc.txt
parentd16e15f5b029fc7d03540ba0e5fb23b0abb0ebe0 (diff)
/proc/pid/smaps: export amount of anonymous memory in a mapping
Export the number of anonymous pages in a mapping via smaps. Even the private pages in a mapping backed by a file, would be marked as anonymous, when they are modified. Export this information to user-space via smaps. Exporting this count will help gdb to make a better decision on which areas need to be dumped in its coredump; and should be useful to others studying the memory usage of a process. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Acked-by: Hugh Dickins <hughd@google.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/filesystems/proc.txt')
-rw-r--r--Documentation/filesystems/proc.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index a563b74c7aef..976de6e19dd8 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -370,6 +370,7 @@ Shared_Dirty: 0 kB
370Private_Clean: 0 kB 370Private_Clean: 0 kB
371Private_Dirty: 0 kB 371Private_Dirty: 0 kB
372Referenced: 892 kB 372Referenced: 892 kB
373Anonymous: 0 kB
373Swap: 0 kB 374Swap: 0 kB
374KernelPageSize: 4 kB 375KernelPageSize: 4 kB
375MMUPageSize: 4 kB 376MMUPageSize: 4 kB
@@ -378,9 +379,15 @@ The first of these lines shows the same information as is displayed for the
378mapping in /proc/PID/maps. The remaining lines show the size of the mapping 379mapping in /proc/PID/maps. The remaining lines show the size of the mapping
379(size), the amount of the mapping that is currently resident in RAM (RSS), the 380(size), the amount of the mapping that is currently resident in RAM (RSS), the
380process' proportional share of this mapping (PSS), the number of clean and 381process' proportional share of this mapping (PSS), the number of clean and
381dirty shared pages in the mapping, and the number of clean and dirty private 382dirty private pages in the mapping. Note that even a page which is part of a
382pages in the mapping. The "Referenced" indicates the amount of memory 383MAP_SHARED mapping, but has only a single pte mapped, i.e. is currently used
383currently marked as referenced or accessed. 384by only one process, is accounted as private and not as shared. "Referenced"
385indicates the amount of memory currently marked as referenced or accessed.
386"Anonymous" shows the amount of memory that does not belong to any file. Even
387a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE
388and a page is modified, the file page is replaced by a private anonymous copy.
389"Swap" shows how much would-be-anonymous memory is also used, but out on
390swap.
384 391
385This file is only present if the CONFIG_MMU kernel configuration option is 392This file is only present if the CONFIG_MMU kernel configuration option is
386enabled. 393enabled.