From: Ridong Chen <ridong.chen@linux.dev>
To: Michal Hocko <mhocko@suse.com>
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: Mon, 24 Aug 2026 11:24:46 +0800 [thread overview]
Message-ID: <de7d583e-bd9b-464f-9e28-73075c0211a4@linux.dev> (raw)
In-Reply-To: <aog0ch0u8BtkR-a1@tiehlicka>
On 8/21/2026 7:20 PM, Michal Hocko wrote:
> On Fri 21-08-26 19:10:45, Ridong Chen wrote:
>>>> Did you mean that min_slab_pages and min_unmapped_pages should influence
>>>> proactive per-node reclaim?
>>>
I apologize for being incoherent in my last email, it was after a full day of
work. What I wanted to say is that min_slab_pages and min_unmapped_pages should
*not* influence proactive per-node reclaim.
>>> Nope, exactly opposite
>>>
>>
>> I would really appreciate it if you could clarify this further. Sorry, I'm
>> not sure I fully understand what you meant.
>
> pro-active (userspace triggered) node reclaim should completely ignore
> all those historical node_reclaim tunables.
Yeah, this matches my understanding. Apologies again for the confusing reply.
Since Johannes has acked patch 3, perhaps we can simply remove the conditional
check in __node_reclaim and keep the shrink loop as follows:
```
@@ -7906,16 +7906,16 @@ static unsigned long __node_reclaim(struct pglist_data
*pgdat,
noreclaim_flag = memalloc_noreclaim_save();
set_task_reclaim_state(p, &sc->reclaim_state);
- if (node_pagecache_reclaimable(pgdat) > pgdat->min_unmapped_pages ||
- node_page_state_pages(pgdat, NR_SLAB_RECLAIMABLE_B) > pgdat->min_slab_pages) {
- /*
- * Free memory by calling shrink node with increasing
- * priorities until we have enough memory freed.
- */
- do {
- shrink_node(pgdat, sc);
- } while (sc->nr_reclaimed < nr_pages && --sc->priority >= 0);
- }
+ /*
+ * Free memory by calling shrink node with increasing
+ * priorities until we have enough memory freed.
+ *
+ * What to reclaim is gated per type by sc->skip_slab_reclaim and
+ * sc->skip_file_reclaim.
+ */
+ do {
+ shrink_node(pgdat, sc);
+ } while (sc->nr_reclaimed < nr_pages && --sc->priority >= 0);
set_task_reclaim_state(p, NULL);
memalloc_noreclaim_restore(noreclaim_flag);
```
--
Best regards
Ridong
next prev parent reply other threads:[~2026-08-24 3:24 UTC|newest]
Thread overview: 25+ 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-24 3:26 ` Ridong Chen
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 ` [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type Michal Hocko
2026-08-21 8:58 ` 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 21:35 ` Roman Gushchin
2026-08-21 21:44 ` John Hubbard
2026-08-21 21:49 ` Roman Gushchin
2026-08-22 0:08 ` SJ Park
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
2026-08-24 3:24 ` Ridong Chen [this message]
-- 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=de7d583e-bd9b-464f-9e28-73075c0211a4@linux.dev \
--to=ridong.chen@linux.dev \
--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=mhocko@suse.com \
--cc=qi.zheng@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