From: Andrew Morton <akpm@linux-foundation.org>
To: Hui Zhu <hui.zhu@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
David Hildenbrand <david@kernel.org>,
Qi Zheng <qi.zheng@linux.dev>, Lorenzo Stoakes <ljs@kernel.org>,
Kairui Song <kasong@tencent.com>, Barry Song <baohua@kernel.org>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Hui Zhu <zhuhui@kylinos.cn>
Subject: Re: [PATCH v4 0/4] mm: workingset: fix the shadow node budget under MGLRU
Date: Tue, 8 Sep 2026 18:37:33 -0700 [thread overview]
Message-ID: <20260908183733.ea115c9f8e6f88220d1b9b5b@linux-foundation.org> (raw)
In-Reply-To: <cover.1788837625.git.zhuhui@kylinos.cn>
On Tue, 8 Sep 2026 11:41:10 +0800 Hui Zhu <hui.zhu@linux.dev> wrote:
> From: Hui Zhu <zhuhui@kylinos.cn>
>
> Commit 7404bd37cfbe ("mm: workingset: use lruvec_lru_size() to get the
> number of lru pages") broke the workingset shadow node budget under
> MGLRU: lruvec_lru_size() reads mz->lru_zone_size, which MGLRU never
> maintains, so count_shadow_nodes() sees the evictable LRU lists as
> empty and the shadow shrinker reclaims eviction tokens almost as fast
> as they are created, losing thrashing protection.
>
> ...
>
> Performance testing
> ===================
>
> The test script and the raw results are available at [1].
>
> Environment: 10-vCPU QEMU guest, 8 GiB RAM, cgroup v2; 7 runs per
> configuration, medians reported. Workloads:
>
> w1-anon-churn: single-threaded anon fault/charge loop in a memcg
> (MADV_DONTNEED + re-fault, no reclaim). Every touch
> is a real fault with charge and memcg stat updates,
> so it stresses exactly the fast path patch 1 changes.
> w2-file-churn: file read loop under memory.high pressure
> (reclaim-bound, noisier).
> w3-reparent: reparent accounting sanity check.
>
> w1-anon-churn (pages/s):
>
> classic LRU MGLRU
> base 4393028 4377122
> patches 1-2 4385996 (-0.2%) 4352887 (-0.6%)
> patches 1-3 4381832 (-0.3%) 4377053 (+0.0%)
>
> w2-file-churn (MB/s):
>
> classic LRU MGLRU
> base 8277 8226
> patches 1-2 8226 (-0.6%) 8123 (-1.3%)
> patches 1-3 8157 (-1.4%) 8294 (+0.8%)
Am I misinterpreting this? This difference is probably within
inter-run variability?
next prev parent reply other threads:[~2026-09-09 1:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 3:41 [PATCH v4 0/4] mm: workingset: fix the shadow node budget under MGLRU Hui Zhu
2026-09-08 3:41 ` [PATCH v4 1/4] mm: memcg: redirect stats updates of dying memcgs for all hierarchies Hui Zhu
2026-09-08 3:41 ` [PATCH v4 2/4] mm: workingset: use lruvec_page_state_local() to count lru pages Hui Zhu
2026-09-08 3:41 ` [PATCH v4 3/4] mm: memcg: skip the RCU lock when the memcg is not dying Hui Zhu
2026-09-08 3:41 ` [PATCH v4 4/4] mm: memcg: reparent non-hierarchical lruvec stats on cgroup v2 Hui Zhu
2026-09-09 1:37 ` Andrew Morton [this message]
2026-09-10 2:29 ` [PATCH v4 0/4] mm: workingset: fix the shadow node budget under MGLRU Hui Zhu
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=20260908183733.ea115c9f8e6f88220d1b9b5b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hui.zhu@linux.dev \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=qi.zheng@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhuhui@kylinos.cn \
/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