diff mbox series

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

Message ID 20210421061127.1182723-1-rppt@kernel.org (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series [v3] docs: proc.rst: meminfo: briefly describe gaps in memory accounting | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Mike Rapoport April 21, 2021, 6:11 a.m. UTC
From: Mike Rapoport <rppt@linux.ibm.com>

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

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
v3:
* Add sentense about counters overlap
* Use wording suggested by Matthew

v2: Link: https://lore.kernel.org/lkml/20210420121354.1160437-1-rppt@kernel.org
* 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/20210420085105.1156640-1-rppt@kernel.org
 Documentation/filesystems/proc.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Michal Hocko April 21, 2021, 7 a.m. UTC | #1
On Wed 21-04-21 09:11:27, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
> 
> Add a paragraph that explains that it may happen that the counters in
> /proc/meminfo do not add up to the overall memory usage.
> 
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> v3:
> * Add sentense about counters overlap
> * Use wording suggested by Matthew
> 
> v2: Link: https://lore.kernel.org/lkml/20210420121354.1160437-1-rppt@kernel.org
> * 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/20210420085105.1156640-1-rppt@kernel.org
>  Documentation/filesystems/proc.rst | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index 48fbfc336ebf..0a07a5025571 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -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.
>  
>  ::
>  
> -- 
> 2.29.2
>
Matthew Wilcox April 21, 2021, 12:37 p.m. UTC | #2
On Wed, Apr 21, 2021 at 09:11:27AM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
> 
> Add a paragraph that explains that it may happen that the counters in
> /proc/meminfo do not add up to the overall memory usage.
> 
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Vlastimil Babka April 23, 2021, 2:27 p.m. UTC | #3
On 4/21/21 8:11 AM, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
> 
> Add a paragraph that explains that it may happen that the counters in
> /proc/meminfo do not add up to the overall memory usage.
> 
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

Thanks.

> ---
> v3:
> * Add sentense about counters overlap
> * Use wording suggested by Matthew
> 
> v2: Link: https://lore.kernel.org/lkml/20210420121354.1160437-1-rppt@kernel.org
> * 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/20210420085105.1156640-1-rppt@kernel.org
>  Documentation/filesystems/proc.rst | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index 48fbfc336ebf..0a07a5025571 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -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.
>  
>  ::
>  
>
diff mbox series

Patch

diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 48fbfc336ebf..0a07a5025571 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -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.
 
 ::