diff options
author | Nikanth Karthikesan <knikanth@suse.de> | 2010-10-27 18:34:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:13 -0400 |
commit | b40d4f84becd69275451baee7f0801c85eb58437 (patch) | |
tree | 78258f7b431a900bf8292d25970dea74b8aa283f /Documentation/filesystems | |
parent | d16e15f5b029fc7d03540ba0e5fb23b0abb0ebe0 (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')
-rw-r--r-- | Documentation/filesystems/proc.txt | 13 |
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 | |||
370 | Private_Clean: 0 kB | 370 | Private_Clean: 0 kB |
371 | Private_Dirty: 0 kB | 371 | Private_Dirty: 0 kB |
372 | Referenced: 892 kB | 372 | Referenced: 892 kB |
373 | Anonymous: 0 kB | ||
373 | Swap: 0 kB | 374 | Swap: 0 kB |
374 | KernelPageSize: 4 kB | 375 | KernelPageSize: 4 kB |
375 | MMUPageSize: 4 kB | 376 | MMUPageSize: 4 kB |
@@ -378,9 +379,15 @@ The first of these lines shows the same information as is displayed for the | |||
378 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 379 | mapping 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 |
380 | process' proportional share of this mapping (PSS), the number of clean and | 381 | process' proportional share of this mapping (PSS), the number of clean and |
381 | dirty shared pages in the mapping, and the number of clean and dirty private | 382 | dirty private pages in the mapping. Note that even a page which is part of a |
382 | pages in the mapping. The "Referenced" indicates the amount of memory | 383 | MAP_SHARED mapping, but has only a single pte mapped, i.e. is currently used |
383 | currently marked as referenced or accessed. | 384 | by only one process, is accounted as private and not as shared. "Referenced" |
385 | indicates 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 | ||
387 | a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE | ||
388 | and 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 | ||
390 | swap. | ||
384 | 391 | ||
385 | This file is only present if the CONFIG_MMU kernel configuration option is | 392 | This file is only present if the CONFIG_MMU kernel configuration option is |
386 | enabled. | 393 | enabled. |