Re: [RFC PATCH 0/4] mm/vmscan: honour node reclaim limits per type
Ridong Chen <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
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