v5 2026-11-11

解除VMA过滤对内存层级提升的阻断 · v5

NUMA 分级 v5 支持仅提升扫描,允许共享 folio 提升到快层,并分离 VMA 放置与扫描延续。

原始补丁链接

子 Patch(7)

1/7
mm: support promotion-only NUMA hinting scans
新增 MM_CP_PROT_NUMA_PROMO_ONLY,让 task_numa_work() 可发起只做 promotion 的 NUMA hinting 扫描,避免 tiering 模式误用 normal 模式的只读/非活跃 VMA 过滤而漏扫。
2/7
mm: allow shared folios to be promoted to a fast tier
放宽可提升页限制:低层内存到 top-tier 的南向北 promotion 不再因共享 COW/可执行文件多进程映射被拒;保留东西向和北向南限制,并重命名 folio_numab_promotable()。
3/7
sched/numa: scan read-only file mappings in tiering mode
tiering 模式下不再跳过只读文件映射,而是以 promotion-only 方式扫描;VMA 策略由 task_numa_work() 的 balancing 模式快照决定,避免热文件页长期滞留慢层。
4/7
sched/numa: separate VMA placement from scan continuation
将 vma_is_accessed() 改名 vma_needs_placement_scan(),并在 task_numa_work() 单独处理跨窗口续扫状态,记录续扫是否 promotion-only;避免把扫描续接误当成 placement 资格。
5/7
sched/numa: scan PID-inactive VMAs for promotion
Commit fc137c0ddab2 (“sched/numa: enhance vma scanning logic”) skips VMAs without recent PID activity. Since only NUMA hint faults record that activity, the filter can suppress the fault needed to pro
6/7
mm: use BIT() for change_protection() flags
[mm: use BIT() for change_protection() flags] The MM_CP_* flags are individual bits expressed as open-coded shifts. Use BIT() consistently for the complete block. No functional change intended. Sugg
7/7
mm: use VMA flag helpers in NUMA balancing
[mm: use VMA flag helpers in NUMA balancing] Use vma_test() instead of accessing vm_flags directly in the NUMA balancing code touched by the preceding fixes. Keep the existing flag predicates unchange