linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Chris Down <chris@chrisdown.name>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>, Tejun Heo <tj@kernel.org>,
	Roman Gushchin <guro@fb.com>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
	linux-mm@kvack.org, kernel-team@fb.com
Subject: Re: [PATCH] docs: cgroup: mm: Document why inactive_X + active_X may not equal X
Date: Mon, 11 Nov 2019 15:53:54 +0100	[thread overview]
Message-ID: <20191111145354.GN1396@dhcp22.suse.cz> (raw)
In-Reply-To: <20191111144958.GA11914@chrisdown.name>

On Mon 11-11-19 14:49:58, Chris Down wrote:
> This has confused a significant number of people using cgroups inside
> Facebook, and some of those outside as well judging by posts like
> this[0] (although it's not a problem unique to cgroup v2). If shmem
> handling in particular becomes more coherent at some point in the future
> -- although that seems unlikely now -- we can change the wording here.
> 
> [0]: https://unix.stackexchange.com/q/525092/10762
> 
> Signed-off-by: Chris Down <chris@chrisdown.name>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Roman Gushchin <guro@fb.com>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: cgroups@vger.kernel.org
> Cc: linux-mm@kvack.org
> Cc: kernel-team@fb.com

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

> ---
>  Documentation/admin-guide/cgroup-v2.rst | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 0704552ed94f..0636bcb60b5a 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1289,7 +1289,12 @@ PAGE_SIZE multiple when read back.
>  	  inactive_anon, active_anon, inactive_file, active_file, unevictable
>  		Amount of memory, swap-backed and filesystem-backed,
>  		on the internal memory management lists used by the
> -		page reclaim algorithm
> +		page reclaim algorithm.
> +
> +		As these represent internal list state (eg. shmem pages are on anon
> +		memory management lists), inactive_foo + active_foo may not be equal to

and anon will move to file list after MADV_FREE.

> +		the value for the foo counter, since the foo counter is type-based, not
> +		list-based.
>  
>  	  slab_reclaimable
>  		Part of "slab" that might be reclaimed, such as
> -- 
> 2.24.0

-- 
Michal Hocko
SUSE Labs

      reply	other threads:[~2019-11-11 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 14:49 [PATCH] docs: cgroup: mm: Document why inactive_X + active_X may not equal X Chris Down
2019-11-11 14:53 ` Michal Hocko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111145354.GN1396@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=chris@chrisdown.name \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).