v1
2026-08-29
整理MGLRU扫描隔离函数 · v1
清理 MGLRU isolate_folios():改进耗尽检测与隔离失败重试逻辑,性能无明显变化。
原始补丁链接
子 Patch(3)
1/3
mm/mglru: improve readability of isolate_folios()
[Re: [PATCH 1/3] mm/mglru: improve readability of isolate_folios()] On 8/20/26 12:56 PM, Barry Song (Xiaomi) wrote: > From: Ridong Chen chenridong@xiaomi.com > > The for_each_evictable_type() loop
2/3
mm/mglru: improve scan_folios() exhaustion detection
为 scan_folios() 增加 exhausted 输出参数,显式判断当前 type 可回收列表是否耗尽;修复仅用 scanned==0 的误判,并考虑多 generation 下第二老仍可回收的情况。
3/3
mm/mglru: retry the same type once if isolation fails due to races
mglru 隔离失败且未耗尽时,因竞争/提升/保护导致无 folio,对同一 type 重试一次,避免直接进入外层循环;改动在 vmscan.c。