From: Chris Down <chris@chrisdown.name>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: akpm@linux-foundation.org, david@kernel.org, yosry@kernel.org,
mkoutny@suse.com, shakeel.butt@linux.dev, hannes@cmpxchg.org,
mhocko@kernel.org, roman.gushchin@linux.dev,
muchun.song@linux.dev, nphamcs@gmail.com,
chengming.zhou@linux.dev, sj@kernel.org, ljs@kernel.org,
linux-mm@kvack.org, cgroups@vger.kernel.org,
damon@lists.linux.dev
Subject: Re: [PATCH v3 3/4] mm: workingset: skip the root memcg flush in workingset_test_recent()
Date: Mon, 16 Nov 2026 21:07:35 -0800 [thread overview]
Message-ID: <avvhF41RlOQSYFq6@chrisdown.name> (raw)
In-Reply-To: <20261114002822.1043378-4-joannelkoong@gmail.com>
Hi Joanne,
Joanne Koong writes:
>- if (flush)
>+ if (flush && !mem_cgroup_is_root(eviction_memcg))
> mem_cgroup_flush_stats_ratelimited(eviction_memcg);
Not a big deal, but in the v2 thread you mentioned you would try a
mem_cgroup_flush_lru_stats_ratelimited() helper for this, per Michal's
suggestion. That still seems like a good idea given this skip and the one in
DAMON rely on everything read after them staying in lruvec_use_node_stat(),
and at least speaking for myself, keeping the root check close to the list
in memcontrol.c makes that easier to see. It doesn't need
to hold this patch up though, and I've tested that refaults in the root
cgroup no longer flush, so either way:
Reviewed-by: Chris Down <chris@chrisdown.name>
Tested-by: Chris Down <chris@chrisdown.name>
Thanks!
Chris
next prev parent reply other threads:[~2026-11-17 5:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 0:28 [PATCH v3 0/4] mm: read root memcg stats from global counters instead of flushing Joanne Koong
2026-11-14 0:28 ` [PATCH v3 1/4] mm: zswap: fix shrinker count for the root memcg Joanne Koong
2026-11-17 5:07 ` Chris Down
2026-11-14 0:28 ` [PATCH v3 2/4] mm: memcg: read root lruvec stats from the node counters Joanne Koong
2026-11-17 5:07 ` Chris Down
2026-11-14 0:28 ` [PATCH v3 3/4] mm: workingset: skip the root memcg flush in workingset_test_recent() Joanne Koong
2026-11-17 5:07 ` Chris Down [this message]
2026-11-14 0:28 ` [PATCH v3 4/4] mm/damon/core: use node counters instead of flushing the root memcg Joanne Koong
2026-11-17 5:07 ` Chris Down
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=avvhF41RlOQSYFq6@chrisdown.name \
--to=chris@chrisdown.name \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chengming.zhou@linux.dev \
--cc=damon@lists.linux.dev \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=joannelkoong@gmail.com \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=sj@kernel.org \
--cc=yosry@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