Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Ridong Chen <ridong.chen@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	David Hildenbrand <david@kernel.org>,
	Qi Zheng <qi.zheng@linux.dev>,
	Shakeel Butt <shakeel.butt@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>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Ridong Chen <chenridong@xiaomi.com>
Subject: Re: [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type
Date: Fri, 21 Aug 2026 10:31:06 +0200	[thread overview]
Message-ID: <aogMyu5R_DZRqp2J@tiehlicka> (raw)
In-Reply-To: <20260821081741.1340277-1-ridong.chen@linux.dev>

On Fri 21-08-26 16:17:37, Ridong Chen wrote:
> From: Ridong Chen <chenridong@xiaomi.com>
> 
> min_unmapped_pages and min_slab_pages are documented as per-type limits,
> but node reclaim treats them as one combined gate: once either is
> exceeded, shrink_node() reclaims slab, file and anon together and pushes
> the other type below its limit. Per-node proactive reclaim reuses the
> same gate and fares worse -- with page cache and slab both under their
> limits it reclaims nothing and returns -EAGAIN on an anon-heavy node [1].
> 
> This series gates each type separately via two scan_control flags
> (skip_slab_reclaim, skip_file_reclaim) set only on the node reclaim path,
> drops the combined gate, and extends node_reclaim()'s early bail to check
> anon. The flags default to zero, so kswapd, direct, memcg and drop_caches
> are unaffected.

You are explaining what but missing the most important part _Why_ do we
need to have this addressed? Is this just addressing Sashiko review
refernced below? Is there any real usecase where the current behavior
matters?

> Tested on QEMU (x86_64, 2 NUMA nodes), A/B kernels differing only in this
> series.
> 
> Proactive reclaim (echo to node/reclaim) on an anon-heavy node, file and
> slab under their limits:
> 
>   metric              before   after
>   -----------------   ------   -----------
>   pages reclaimed     0 MiB    254 MiB anon
>   return value        -EAGAIN  0
> 
> Node reclaim (zone_reclaim_mode) with one type under its limit -- the type
> under its limit must be left alone:
> 
>   type under limit    before          after
>   -----------------   -------------   --------
>   slab                645 scans       0 scans
>   page cache          83 MiB scanned  0 MiB
> 
> [1] https://sashiko.dev/#/patchset/20260723045718.2052070-1-ridong.chen@linux.dev
> 
> Ridong Chen (4):
>   mm/vmscan: only reclaim slab in node reclaim when over min_slab_pages
>   mm/vmscan: only reclaim file pages in node reclaim when over
>     min_unmapped_pages
>   mm/vmscan: drop the combined limit gate in __node_reclaim()
>   mm/vmscan: do not skip node reclaim when only anon is reclaimable
> 
>  mm/vmscan.c | 89 ++++++++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 67 insertions(+), 22 deletions(-)
> 
> -- 
> 2.34.1

-- 
Michal Hocko
SUSE Labs


  parent reply	other threads:[~2026-08-21  8:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  8:17 [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type Ridong Chen
2026-08-21  8:17 ` [RFC PATCH 1/4] mm/vmscan: only reclaim slab in node reclaim when over min_slab_pages Ridong Chen
2026-08-21  8:17 ` [RFC PATCH 2/4] mm/vmscan: only reclaim file pages in node reclaim when over min_unmapped_pages Ridong Chen
2026-08-21  8:17 ` [RFC PATCH 3/4] mm/vmscan: drop the combined limit gate in __node_reclaim() Ridong Chen
2026-08-21 12:49   ` Johannes Weiner
2026-08-21  8:17 ` [RFC PATCH 4/4] mm/vmscan: do not skip node reclaim when only anon is reclaimable Ridong Chen
2026-08-21  8:31 ` Michal Hocko [this message]
2026-08-21  8:58   ` [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type Lorenzo Stoakes (ARM)
2026-08-21  9:21     ` Michal Hocko
2026-08-21 11:16       ` Lorenzo Stoakes (ARM)
2026-08-21 11:26         ` Michal Hocko
2026-08-21 13:43           ` Lorenzo Stoakes (ARM)
2026-08-21  9:07   ` Ridong Chen
2026-08-21  9:24     ` Michal Hocko
2026-08-21 10:52       ` Ridong Chen
2026-08-21 11:02         ` Michal Hocko
2026-08-21 11:10           ` Ridong Chen
2026-08-21 11:20             ` Michal Hocko
  -- strict thread matches above, loose matches on Subject: below --
2026-08-21  8:16 Ridong Chen

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=aogMyu5R_DZRqp2J@tiehlicka \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=chenridong@xiaomi.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=ridong.chen@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=weixugc@google.com \
    --cc=yuanchu@google.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