Re: [PATCH v2 1/2] mm/mglru: make type fallback logic explicit in isolate_folios()
From: Baolin Wang
Date: Mon Aug 31 2026 - 05:08:21 EST
On 8/29/26 3:42 PM, Barry Song (Xiaomi) wrote:
From: Ridong Chen <chenridong@xxxxxxxxxx>
The for_each_evictable_type() loop in isolate_folios()
is misleading: it does not actually iterate over each
evictable type. Instead, get_type_to_scan() selects the
type to scan, while the iterator `i` merely bounds the
number of attempts.
Make the fallback behavior explicit in the code and remove the
opaque for_each_evictable_type(i, swappiness).
Signed-off-by: Ridong Chen <chenridong@xxxxxxxxxx>
Co-developed-by: Barry Song (Xiaomi) <baohua@xxxxxxxxxx>
Signed-off-by: Barry Song (Xiaomi) <baohua@xxxxxxxxxx>
---
LGTM.
Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>