All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Shakeel Butt <shakeelb@google.com>
Cc: Roman Gushchin <guro@fb.com>, Michal Hocko <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: memcontrol: account pagetables per node
Date: Mon, 30 Nov 2020 15:19:16 -0500	[thread overview]
Message-ID: <20201130201916.GB23216@cmpxchg.org> (raw)
In-Reply-To: <20201126005603.1293012-3-shakeelb@google.com>

On Wed, Nov 25, 2020 at 04:56:03PM -0800, Shakeel Butt wrote:
> For many workloads, pagetable consumption is significant and it makes
> sense to expose it in the memory.stat for the memory cgroups. However at
> the moment, the pagetables are accounted per-zone. Converting them to
> per-node and using the right interface will correctly account for the
> memory cgroups as well.
> 
> Signed-off-by: Shakeel Butt <shakeelb@google.com>

Agreed, this is a useful stat item to have.

Just one trivial issue:

> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -151,7 +151,6 @@ enum zone_stat_item {
>  	NR_ZONE_UNEVICTABLE,
>  	NR_ZONE_WRITE_PENDING,	/* Count of dirty, writeback and unstable pages */
>  	NR_MLOCK,		/* mlock()ed pages found and moved off LRU */
> -	NR_PAGETABLE,		/* used for pagetables */
>  	/* Second 128 byte cacheline */
>  	NR_BOUNCE,
>  #if IS_ENABLED(CONFIG_ZSMALLOC)
> @@ -206,6 +205,7 @@ enum node_stat_item {
>  #if IS_ENABLED(CONFIG_SHADOW_CALL_STACK)
>  	NR_KERNEL_SCS_KB,	/* measured in KiB */
>  #endif
> +	NR_PAGETABLE,		/* used for pagetables */
>  	NR_VM_NODE_STAT_ITEMS
>  };

You need to update mm/vmstat.c::vmstat_text accordingly or
/proc/vmstat output will be bogus.

With that fixed, please feel free to add:
Acked-by: Johannes Weiner <hannes@cmpxchg.org>

  reply	other threads:[~2020-11-30 20:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  0:56 [PATCH 0/2] memcg: add pagetable comsumption to memory.stat Shakeel Butt
2020-11-26  0:56 ` Shakeel Butt
2020-11-26  0:56 ` [PATCH 1/2] mm: move lruvec stats update functions to vmstat.h Shakeel Butt
2020-11-26  0:56   ` Shakeel Butt
2020-11-30 20:09   ` Johannes Weiner
2020-11-26  0:56 ` [PATCH 2/2] mm: memcontrol: account pagetables per node Shakeel Butt
2020-11-26  0:56   ` Shakeel Butt
2020-11-30 20:19   ` Johannes Weiner [this message]
2020-11-30 20:54     ` Shakeel Butt
2020-11-30 20:54       ` Shakeel Butt
2020-11-30 20:34 ` [PATCH 0/2] memcg: add pagetable comsumption to memory.stat Roman Gushchin
2020-11-30 21:01   ` Shakeel Butt
2020-11-30 21:01     ` Shakeel Butt
2020-11-30 21:10     ` Roman Gushchin
2020-11-30 21:13       ` Shakeel Butt
2020-11-30 21:13         ` Shakeel Butt

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=20201130201916.GB23216@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shakeelb@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.