v4
2026-11-09
修复 KSM 智能扫描漏合并 · v4
KSM smart scan v4 对齐跳扫描次数,补文档并增强 selftests,覆盖老化页合并。
原始补丁链接
子 Patch(5)
1/5
mm/ksm: align smart scan skips with the scan number
KSM smart scan 改为按全局扫描号取模跳扫(2/4/8),替代 rmap_item 自身倒计时;避免不同年龄的相同页相位错开而无法同扫,导致 unstable tree 合并长期失败。
2/5
docs/mm: ksm: describe how smart scan picks the scans to skip
在 Documentation/mm/ksm.rst 新增 smart scan 小节,说明未合并页的跳扫频率及按全局扫描号选扫;补足 admin-guide 仅提跳过失败页、未解释不同年龄相同页仍能相遇这一 unstable tree 合并前提的空白。
3/5
selftests/mm: fail KSM helpers on short reads and writes
On Sun, Nov 08, 2026 at 08:22:52PM -0500, Qiliang Yuan wrote: > The KSM helpers in vm_util read and write KSM’s sysfs and procfs files > with a single pread() or write(), and return -errno when the ca
4/5
selftests/mm: move waiting for KSM full scans into a helper
On Sun, Nov 08, 2026 at 08:22:53PM -0500, Qiliang Yuan wrote: > ksm_start() enables ksmd and then polls full_scans until two more full > scans have completed, so that any merging that can happen has h
5/5
selftests/mm: cover merging KSM pages aged by smart scan
On Sun, Nov 08, 2026 at 08:22:54PM -0500, Qiliang Yuan wrote: > ksm_functional_tests checks merging and unmerging with ksmd’s default > settings, but nothing there exercises smart scan, which skips pa