From: Yosry Ahmed <yosry@kernel.org>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
Dennis Zhou <dennis@kernel.org>, Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@gentwo.org>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH] mm/percpu, memcontrol: Per-memcg-lruvec percpu accounting
Date: Mon, 30 Mar 2026 12:02:35 -0700 [thread overview]
Message-ID: <CAO9r8zM1My0cdMV4NomHL-zyconjjq6dP5iSqOyWm10Gnfe7fw@mail.gmail.com> (raw)
In-Reply-To: <20260330185947.2427740-1-joshua.hahnjy@gmail.com>
> > You should probably also speak to extra memory overhead to move all
> > these stats from per-memcg to per-lruvec.
>
> Hello Yosry,
>
> Thank you for your feedback!
>
> Here are the things that I cna see from my end:
> - NR_PERCPU_B adds a byte per-node, per-cpu. I think this is manageable.
> - lruvec_stats_percpu grows by 1 long in 2 arrays (state, state_prev) since
> NR_MEMCG_NODE_STAT_ITEMS grows by 1 from ~30. This is +16 bytes per
> cgroup x node x CPU. Even still, I'm not sure this is too concerning,
> on a host with 300 CPUs across 2 nodes with 100 cgroups (theoretical)
> we would see a 16 * 300 * 2 * 100 = 937 kB change, less than a mB (and
> I think this would be considered a big machine).
>
> What do you think? Do these numbers look acceptable?
Oh I wasn't trying to say whether this is acceptable or not, just that
this is a relevant context that should be included to help people see
the tradeoff clearly and make a decision.
>
> Thanks again for your insights, I hope you have a great day : -)
> Joshua
>
next prev parent reply other threads:[~2026-03-30 19:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 19:19 Joshua Hahn
2026-03-30 12:03 ` Michal Hocko
2026-03-30 14:10 ` Joshua Hahn
2026-03-30 14:21 ` Michal Hocko
2026-03-30 14:56 ` Joshua Hahn
2026-04-02 12:24 ` Michal Hocko
2026-03-30 18:35 ` Yosry Ahmed
2026-03-30 18:59 ` Joshua Hahn
2026-03-30 19:02 ` Yosry Ahmed [this message]
2026-03-30 21:18 ` Joshua Hahn
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=CAO9r8zM1My0cdMV4NomHL-zyconjjq6dP5iSqOyWm10Gnfe7fw@mail.gmail.com \
--to=yosry@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=cl@gentwo.org \
--cc=david@kernel.org \
--cc=dennis@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
--cc=vbabka@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