From: Chen Ridong <chenridong@huaweicloud.com>
To: akpm@linux-foundation.org, axelrasmussen@google.com,
yuanchu@google.com, weixugc@google.com, david@kernel.org,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, corbet@lwn.net, skhan@linuxfoundation.org,
hannes@cmpxchg.org, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, muchun.song@linux.dev,
zhengqi.arch@bytedance.com
Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
lujialin4@huawei.com, ryncsn@gmail.com
Subject: Re: [RFC PATCH -next 0/7] Introduce heat-level memcg reclaim
Date: Thu, 29 Jan 2026 19:25:01 +0800 [thread overview]
Message-ID: <bfba09cf-89d8-4ec1-9299-7128d79569ff@huaweicloud.com> (raw)
In-Reply-To: <20260120134256.2271710-1-chenridong@huaweicloud.com>
On 2026/1/20 21:42, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
>
> The memcg LRU was originally introduced to improve scalability during
> global reclaim, but it only supports gen lru global reclaim and its
> implementation has become complex. Moreover, it has caused performance
> regressions when dealing with a large number of memory cgroups [1].
>
> Previous attempts to remove memcg LRU by switching back to iteration
> implementation brought performance regression [3].
>
> This series introduces a per-memcg heat level mechanism for reclaim,
> aiming to unify gen lru and traditional LRU global reclaim. The core
> idea is to track per-node per-memcg reclaim state, including heat,
> last_decay, and last_refault. Three reclaim heat levels are defined:
> cold, warm, and hot. Cold memcgs are reclaimed first; only if cold
> memcgs cannot reclaim enough pages, warm memcgs become eligible for
> reclaim. Hot memcgs are reclaimed last.
>
> While the heat level design can be applied to all memcg reclaim scenarios,
> this series takes a conservative approach and initially applies it only
> to global reclaim. The first few patches introduce the heat level
> infrastructure and apply it to traditional LRU global reclaim. The
> subsequent patches gradually migrate gen lru global reclaim to the
> heat-level-based approach, with the final patch combining shrink_many
> into shrink_node_memcgs to complete the transition.
>
> Performance results show significant improvements:
>
> Traditional LRU results (2-hour run of test [2]):
> Throughput (number of requests) before after Change
> Total 1,734,169 2,353,717 +35%
>
> Gen LRU results (24-hour run of test [2]):
> Throughput (number of requests) before after Change
> Total 22,879,701 25,331,956 +10%
>
> The performance tests are based on next branch commit:
> commit ef0d146624b0 ("Add linux-next specific files for 20251219")
>
> This series has been rebased on next-20260119:
> commit d08c85ac8894 ("Add linux-next specific files for 20260119")
>
> [1] https://lore.kernel.org/r/20251126171513.GC135004@cmpxchg.org
> [2] https://lore.kernel.org/r/20221222041905.2431096-7-yuzhao@google.com
> [3] https://lore.kernel.org/lkml/20251224073032.161911-1-chenridong@huaweicloud.com/
>
> Chen Ridong (7):
> vmscan: add memcg heat level for reclaim
> mm/mglru: make calls to flush_reclaim_state() similar for MGLRU and
> non-MGLRU
> mm/mglru: rename should_abort_scan to lru_gen_should_abort_scan
> mm/mglru: extend lru_gen_shrink_lruvec to support root reclaim
> mm/mglru: combine shrink_many into shrink_node_memcgs
> mm/mglru: remove memcg disable handling from lru_gen_shrink_node
> mm/mglru: remove memcg lru
>
> Documentation/mm/multigen_lru.rst | 30 --
> include/linux/memcontrol.h | 7 +
> include/linux/mmzone.h | 89 -----
> mm/memcontrol-v1.c | 6 -
> mm/memcontrol.c | 7 +-
> mm/mm_init.c | 1 -
> mm/vmscan.c | 547 ++++++++++++------------------
> 7 files changed, 231 insertions(+), 456 deletions(-)
>
Hi, Johannes and Shakeel,
I would appreciate it if you could share your thoughts on this series.
--
Best regards,
Ridong
prev parent reply other threads:[~2026-01-29 11:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 13:42 Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 1/7] vmscan: add memcg heat level for reclaim Chen Ridong
2026-01-21 7:53 ` Chen Ridong
2026-01-21 14:58 ` Kairui Song
2026-01-22 2:32 ` Chen Ridong
2026-02-06 22:47 ` Yuanchu Xie
2026-02-09 8:17 ` Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 2/7] mm/mglru: make calls to flush_reclaim_state() similar for MGLRU and non-MGLRU Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 3/7] mm/mglru: rename should_abort_scan to lru_gen_should_abort_scan Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 4/7] mm/mglru: extend lru_gen_shrink_lruvec to support root reclaim Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 5/7] mm/mglru: combine shrink_many into shrink_node_memcgs Chen Ridong
2026-01-21 8:13 ` Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 6/7] mm/mglru: remove memcg disable handling from lru_gen_shrink_node Chen Ridong
2026-01-20 13:42 ` [RFC PATCH -next 7/7] mm/mglru: remove memcg lru Chen Ridong
2026-01-29 11:25 ` Chen Ridong [this message]
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=bfba09cf-89d8-4ec1-9299-7128d79569ff@huaweicloud.com \
--to=chenridong@huaweicloud.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=lujialin4@huawei.com \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=ryncsn@gmail.com \
--cc=shakeel.butt@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.com \
/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