Skip to contentSkip to conversation

docs: proc.rst: meminfo: briefly describe gaps in memory accounting

PATCH Applied Mike Rapoport 4 participants 4 messages Apr 21, 2021 – Apr 23, 2021

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 docs: proc.rst: meminfo: briefly describe gaps in memory accounting

From: Mike Rapoport <[email protected]>

Add a paragraph that explains that it may happen that the counters in /proc/meminfo do not add up to the overall memory usage.

---
v3:
* Add sentense about counters overlap
* Use wording suggested by Matthew

v2: Link: https://lore.kernel.org/lkml/[email protected]
* Add brief changelog
* Fix typo
* Update example about network memory usage according to Eric's comment at

https://lore.kernel.org/lkml/CANn89iKprp7WYeZy4RRO5jHykprnSCcVBc7Tk14Ui_MA9OK7Fg@mail.gmail.com

v1: Link: https://lore.kernel.org/lkml/[email protected]

 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/filesystems/proc.rst +9 -2
index 48fbfc336ebf..0a07a5025571 100644
@@ -929,8 +929,15 @@ meminfo
 ~~~~~~~
 
 Provides information about distribution and utilization of memory.  This
-varies by architecture and compile options.  The following is from a
-16GB PIII, which has highmem enabled.  You may not have all of these fields.
+varies by architecture and compile options.  Some of the counters reported
+here overlap.  The memory reported by the non overlapping counters may not
+add up to the overall memory usage and the difference for some workloads
+can be substantial.  In many cases there are other means to find out
+additional memory using subsystem specific interfaces, for instance
+/proc/net/sockstat for TCP memory allocations.
+
+The following is from a 16GB PIII, which has highmem enabled.
+You may not have all of these fields.
 
 ::
 
Signature · 1 line
2.29.2
Acked-by on v3 1/1
#1 lore raw
Quoted 6 lines · Mike Rapoport

From: Mike Rapoport <[email protected]>

Add a paragraph that explains that it may happen that the counters in /proc/meminfo do not add up to the overall memory usage.

Quoted 41 lines

---
v3:
* Add sentense about counters overlap
* Use wording suggested by Matthew

v2: Link: https://lore.kernel.org/lkml/[email protected]
* Add brief changelog
* Fix typo
* Update example about network memory usage according to Eric's comment at

https://lore.kernel.org/lkml/CANn89iKprp7WYeZy4RRO5jHykprnSCcVBc7Tk14Ui_MA9OK7Fg@mail.gmail.com

v1: Link: https://lore.kernel.org/lkml/[email protected]

 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/filesystems/proc.rst +9 -2
index 48fbfc336ebf..0a07a5025571 100644
@@ -929,8 +929,15 @@ meminfo
 ~~~~~~~
 
 Provides information about distribution and utilization of memory.  This
-varies by architecture and compile options.  The following is from a
-16GB PIII, which has highmem enabled.  You may not have all of these fields.
+varies by architecture and compile options.  Some of the counters reported
+here overlap.  The memory reported by the non overlapping counters may not
+add up to the overall memory usage and the difference for some workloads
+can be substantial.  In many cases there are other means to find out
+additional memory using subsystem specific interfaces, for instance
+/proc/net/sockstat for TCP memory allocations.
+
+The following is from a 16GB PIII, which has highmem enabled.
+You may not have all of these fields.
 
 ::
 
Signature · 1 line
2.29.2
Signature · 2 lines
Michal Hocko
SUSE Labs
Acked-by on v3 1/1
#3 lore raw
In reply to Mike Rapoport
Quoted 6 lines · Mike Rapoport

From: Mike Rapoport <[email protected]>

Add a paragraph that explains that it may happen that the counters in /proc/meminfo do not add up to the overall memory usage.

Thanks.

Quoted 39 lines

---
v3:
* Add sentense about counters overlap
* Use wording suggested by Matthew

v2: Link: https://lore.kernel.org/lkml/[email protected]
* Add brief changelog
* Fix typo
* Update example about network memory usage according to Eric's comment at

https://lore.kernel.org/lkml/CANn89iKprp7WYeZy4RRO5jHykprnSCcVBc7Tk14Ui_MA9OK7Fg@mail.gmail.com

v1: Link: https://lore.kernel.org/lkml/[email protected]

 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/filesystems/proc.rst +9 -2
index 48fbfc336ebf..0a07a5025571 100644
@@ -929,8 +929,15 @@ meminfo
 ~~~~~~~
 
 Provides information about distribution and utilization of memory.  This
-varies by architecture and compile options.  The following is from a
-16GB PIII, which has highmem enabled.  You may not have all of these fields.
+varies by architecture and compile options.  Some of the counters reported
+here overlap.  The memory reported by the non overlapping counters may not
+add up to the overall memory usage and the difference for some workloads
+can be substantial.  In many cases there are other means to find out
+additional memory using subsystem specific interfaces, for instance
+/proc/net/sockstat for TCP memory allocations.
+
+The following is from a 16GB PIII, which has highmem enabled.
+You may not have all of these fields.
 
 ::