mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
4cb1deb76f
commit
04dcb3c8f8
|
@ -1026,7 +1026,7 @@ size total program size
|
||||||
(same as VmSize in \fI/proc/[pid]/status\fP)
|
(same as VmSize in \fI/proc/[pid]/status\fP)
|
||||||
resident resident set size
|
resident resident set size
|
||||||
(same as VmRSS in \fI/proc/[pid]/status\fP)
|
(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)
|
text text (code)
|
||||||
.\" (not including libs; broken, includes data segment)
|
.\" (not including libs; broken, includes data segment)
|
||||||
lib library (unused in Linux 2.6)
|
lib library (unused in Linux 2.6)
|
||||||
|
|
Loading…
Reference in New Issue