v2
2026-07-31
kmemleak verbose默认两次扫描 · v2
kmemleak 在 DEBUG_KMEMLEAK_VERBOSE 下默认 min_unref_scans=2,减少误报;同步更新文档和测试注释。
原始补丁链接
子 Patch(3)
1/3
mm: kmemleak: default min_unref_scans to 2 for verbose auto-scan
min_unref_scans defers reporting an object as leaked until it has stayed unreferenced for that many consecutive scans, filtering out objects that are only transiently unreferenced during a scan. It d
2/3
Documentation: kmemleak: document the conditional min_unref_scans default
min_unref_scans now defaults to 2 when CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN and CONFIG_DEBUG_KMEMLEAK_VERBOSE are both enabled, but the documentation still states that the default is unconditionally 1. Si
3/3
selftests/mm: kmemleak: drop stale min_unref_scans default from comments
The test writes min_unref_scans explicitly for every case, so its comments describing 1 as the default are both unnecessary and, since the default is now conditional, wrong. Refer to the threshold val