v3
2026-08-21
为较小大 folio 启用 LRU 缓存 · v3
允许小于COSTLY_ORDER的大folio使用per-CPU LRU缓存,并调整wp reuse判断及split/scan时的缓存排空。
原始补丁链接
子 Patch(4)
1/4
mm: allow smaller large folios to use lru_cache
For systems that primarily use smaller-order large folios, enabling the lru_cache can help reduce lock contention. For higher-order large folios, the number of folios involved is likely to be smaller
2/4
mm: improve large folio reuse for LRU-cached folios
Large folios may now reside in the per-CPU LRU cache. Before attempting to reuse them, drain the local LRU cache, which can still be beneficial in cases where the folios are likely to remain in this C
3/4
mm: drain LRU cache if necessary for splitting large folios
Smaller large folios might now be present in the LRU cache. Use David’s new lru_cache_drain_for_folio() helper to drain the LRU cache before splitting a folio, ensuring that the folio can be split suc
4/4
mm: batch lru_cache draining in deferred_split_scan
deferred_split_scan() splits a batch of folios, so we only need to drain the lru_cache once for the entire batch. Signed-off-by: Barry Song (Xiaomi) baohua@kernel.org — mm/huge_memory.c | 15 +++