On Mon, Nov 30, 2020 at 12:21 PM Johannes Weiner <hannes@xxxxxxxxxxx> wrote: > > 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@xxxxxxxxxx> > > 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. Oh I missed that. Thanks for catching. > > With that fixed, please feel free to add: > Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Thanks.