Skip to contentSkip to conversation

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

PATCH Superseded Mike Rapoport 2 participants 3 messages Apr 20, 2021

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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

From: Mike Rapoport <[email protected]>

---
 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/filesystems/proc.rst +9 -2
index 48fbfc336ebf..bf245151645b 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. Please note that is may happen
+that the memory accounted here does 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 networking
+buffers.
+
+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 v1 1/1
#1 lore raw
Quoted 1 line · Mike Rapoport

From: Mike Rapoport <[email protected]>

Some trivial changelog would be better than nothing.

Quoted 1 line

But I do agree that this is a useful information to have in the documentation. Having networking counters as an example is helpful as well. I am not familiar with those myself much and I do remember there is much to it than just sockstat. It would be great to consult this with some networking expert and extend the documentation for that case which tends to be quite common AFAIK.

Anyway this is already an improvement and a step into the right direction.

one nit below

Quoted 9 lines
---
 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/filesystems/proc.rst +0 -0
index 48fbfc336ebf..bf245151645b 100644

Documentation/filesystems/proc.rst meminfo · line 932

Quoted 6 lines
Documentation/filesystems/proc.rst +1 -2
@@ -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. Please note that is may happen

that it may happen

Quoted 13 lines
Documentation/filesystems/proc.rst +8 -0
+that the memory accounted here does 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 networking
+buffers.
+
+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
#2 lore raw
Quoted 4 lines · Michal Hocko
Quoted 1 line · Mike Rapoport

From: Mike Rapoport <[email protected]>

Some trivial changelog would be better than nothing.

oh, sure.

Quoted 8 lines
Quoted 1 line

But I do agree that this is a useful information to have in the documentation. Having networking counters as an example is helpful as well. I am not familiar with those myself much and I do remember there is much to it than just sockstat. It would be great to consult this with some networking expert and extend the documentation for that case which tends to be quite common AFAIK.

I've found a citation from one of Eric Dumazet's emails [1], and used that instead:

... subsystem specific interfaces, for instance /proc/net/sockstat for TCP memory allocations

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

Quoted 17 lines

Anyway this is already an improvement and a step into the right direction.

one nit below

Quoted 11 lines
---
 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/filesystems/proc.rst +0 -0
index 48fbfc336ebf..bf245151645b 100644
@@ -929,8 +929,15 @@ meminfo
 ~~~~~~~
 
Quoted 6 lines

Documentation/filesystems/proc.rst meminfo · line 932

Quoted 4 lines
Documentation/filesystems/proc.rst +1 -2
 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. Please note that is may happen

that it may happen

Right.

Quoted 17 lines
Quoted 13 lines
Documentation/filesystems/proc.rst +8 -0
+that the memory accounted here does 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 networking
+buffers.
+
+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
Signature · 2 lines
Sincerely yours,
Mike.