aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Lebar <justin.lebar@gmail.com>2012-12-26 23:22:38 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2012-12-26 23:47:50 +0100
commit04dcb3c8f880736f42db87cb2691f64d9f114f9b (patch)
tree8c82512df83373eaa97fee148b954963b67b05ad
parent4cb1deb76f235b30bec7e118bbebeae66336d6ef (diff)
downloadman-pages-04dcb3c8f880736f42db87cb2691f64d9f114f9b.tar.gz
proc.5: statm's "shared" field refers to pages backed by files
I noticed that statm's "shared" field doesn't match the sum of all the "shared" entries in smaps [1]. The kernel docs explain that statm's "shared" field is "number of pages that are shared (i.e. backed by a file)" [2]. smaps appears to call a page shared if it's mapped by at least two processes, which explains this discrepancy. I'm not a kernel hacker, but it appears to me they do mean "i.e." and not "e.g." in the statm description: In fs/proc/task_mmu.c::task_statm, I see *shared = get_mm_counter(mm, MM_FILEPAGES); Here's a patch which updates the man page to match the (hopefully correct) kernel docs. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=807181 [2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/filesystems/proc.txt;h=a1793d670cd01bd374eddf54ffdfc768504291ff;hb=HEAD Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man5/proc.52
1 files changed, 1 insertions, 1 deletions
diff --git a/man5/proc.5 b/man5/proc.5
index e205052529..8c24e255e3 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -1026,7 +1026,7 @@ size total program size
(same as VmSize in \fI/proc/[pid]/status\fP)
resident resident set size
(same as VmRSS in \fI/proc/[pid]/status\fP)
-share shared pages (from shared mappings)
+share shared pages (i.e., backed by a file)
text text (code)
.\" (not including libs; broken, includes data segment)
lib library (unused in Linux 2.6)