Skip to contentSkip to conversation

Extend shmem proc_meminfo(5)

DISCUSSION Carsten Grohmann 2 participants 2 messages May 23, 2025 – May 24, 2025 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hi Alejandro,

currently shmem in proc_meminfo(5) is described with "Amount of memory consumed in tmpfs(5) filesystems.".

I think, that's incomplete, as the other types of shares memory are missing.

Therefore, I suggest to change this statement to:

"Amount of memory consumed in tmpfs(5) filesystems, System V and POSIX shared memory, as well as shared anonymous mappings (MAP_SHARED|MAP_ANONYMOUS)."

Regards,
Carsten

#1 lore raw

Hi Carsten,

Quoted 5 lines · Carsten Grohmann

Hi Alejandro,

currently shmem in proc_meminfo(5) is described with "Amount of memory consumed in tmpfs(5) filesystems.".

I think, that's incomplete, as the other types of shares memory are missing.

Thanks for the report!

Quoted 4 lines

Therefore, I suggest to change this statement to:

"Amount of memory consumed in tmpfs(5) filesystems, System V and POSIX shared memory, as well as shared anonymous mappings (MAP_SHARED|MAP_ANONYMOUS)."

Does this sound good to you?

man/man5/proc_meminfo.5: Shmem also accounts for other types of shared memory

Message-ID: <[email protected]>

alx@devuan:/srv/alx/src/linux/man-pages/man-pages/contrib$ git diff diff --git i/man/man5/proc_meminfo.5 w/man/man5/proc_meminfo.5 index c7d201f79..ee4ba2062 100644
--- i/man/man5/proc_meminfo.5
+++ w/man/man5/proc_meminfo.5
@@ -150,7 +150,11 @@ .SH DESCRIPTION
.IR Shmem " %lu (since Linux 2.6.32)"
Amount of memory consumed in
.BR tmpfs (5)
-filesystems.
+filesystems,
+System V,
+and POSIX shared memory,
+as well as shared anonymous mappings
+.RI ( MAP_SHARED|MAP_ANONYMOUS ).
.TP
.IR KReclaimable " %lu (since Linux 4.20)"
Kernel allocations that the kernel will attempt to reclaim
alx@devuan:/srv/alx/src/linux/man-pages/man-pages/contrib$ MANWIDTH=72 diffman-git --- HEAD:man/man5/proc_meminfo.5
+++ ./man/man5/proc_meminfo.5
@@ -123,7 +123,9 @@
mmap(2)), such as libraries.

Shmem %lu (since Linux 2.6.32)
- Amount of memory consumed in tmpfs(5) filesystems.
+ Amount of memory consumed in tmpfs(5) filesystems,
+ System V, and POSIX shared memory, as well as shared
+ anonymous mappings (MAP_SHARED|MAP_ANONYMOUS).

KReclaimable %lu (since Linux 4.20)
Kernel allocations that the kernel will attempt to

Have a lovely day!
Alex

Signature · 1 line
<https://www.alejandro-colomar.es/>