Re: [PATCH] mm/vmscan: drop the combined limit gate in __node_reclaim()

From: Shakeel Butt

Date: Wed Aug 26 2026 - 14:31:12 EST


On Wed, Aug 26, 2026 at 08:44:09PM +0800, Ridong Chen wrote:
> From: Ridong Chen <chenridong@xxxxxxxxxx>
>
> __node_reclaim() is called from two paths: node_reclaim() and
> user_proactive_reclaim().
>
> node_reclaim() already bails out early unless node_pagecache_reclaimable()
> is over pgdat->min_unmapped_pages or the reclaimable slab is over
> pgdat->min_slab_pages. The identical check inside __node_reclaim() that
> guards the shrink_node() loop is therefore redundant for this path.
>
> user_proactive_reclaim() is proactive reclaim driven by userspace and
> should not be gated by the per-node min_unmapped_pages / min_slab_pages
> limits at all [1]. With the gate in place, a proactive request is silently
> turned into a no-op whenever the node happens to sit below both
> thresholds.
>
> Drop the gate in __node_reclaim() and always run the shrink_node() loop.
> The node_reclaim() path is unchanged, since its caller has already applied
> the same test; the proactive path is no longer wrongly gated.
>
> [1] https://sashiko.dev/#/patchset/20260723045718.2052070-1-ridong.chen@xxxxxxxxx
> Fixes: b980077899ea ("mm: introduce per-node proactive reclaim interface")
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Ridong Chen <chenridong@xxxxxxxxxx>
> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>

Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>