From: Johannes Weiner <hannes@cmpxchg.org>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] mm: rearrange node_stat_item to put memcg stats at start
Date: Tue, 23 Apr 2024 09:58:44 -0400 [thread overview]
Message-ID: <20240423135844.GA21141@cmpxchg.org> (raw)
In-Reply-To: <20240423051826.791934-2-shakeel.butt@linux.dev>
On Mon, Apr 22, 2024 at 10:18:23PM -0700, Shakeel Butt wrote:
> At the moment the memcg stats are sized based on the size of enum
> node_stat_item but not all fields in node_stat_item corresponds to memcg
> stats. So, rearrage the contents of node_stat_item such that all the
> memcg specific stats are at the top and then the later patches will make
> sure that the memcg code will not waste space for non-memcg stats.
>
> Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
This series is a great idea and the savings speak for themselves.
But rearranging and splitting vmstats along the memcg-nomemcg line
seems like an undue burden on the non-memcg codebase and interface.
- It messes with user-visible /proc/vmstat ordering, and sets things
up to do so on an ongoing basis as stats are added to memcg.
- It also separates related stats (like the workingset ones) in
/proc/vmstat when memcg only accounts a subset.
Would it make more sense to have a translation table inside memcg?
Like we have with memcg1_events.
next prev parent reply other threads:[~2024-04-23 13:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 5:18 [PATCH 0/4] memcg: reduce memory consumption by memcg stats Shakeel Butt
2024-04-23 5:18 ` [PATCH 1/4] mm: rearrange node_stat_item to put memcg stats at start Shakeel Butt
2024-04-23 13:58 ` Johannes Weiner [this message]
2024-04-23 17:44 ` Shakeel Butt
2024-04-23 18:30 ` Johannes Weiner
2024-04-25 22:54 ` Chris Li
2024-04-25 18:01 ` Chris Li
2024-04-23 5:18 ` [PATCH 2/4] memcg: reduce memory for the lruvec and memcg stats Shakeel Butt
2024-04-23 14:40 ` kernel test robot
2024-04-23 20:58 ` kernel test robot
2024-04-23 5:22 ` [PATCH 3/4] memcg: use proper type for mod_memcg_state Shakeel Butt
2024-04-23 5:23 ` [PATCH 4/4] memcg: restrict __mod_memcg_lruvec_state to memcg stats 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=20240423135844.GA21141@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
/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