mm: kmemleak: avoid long RCU read-side sections in reports
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm: kmemleak: serialize disable-time cleanupmm/ | +2 | 1 reply | |
| 2/2 | mm: kmemleak: reschedule while reading reportsmm/ | +9 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Catalin Marinas |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] mm: kmemleak: avoid long RCU read-side sections in reports
Reading a kmemleak report can traverse all tracked objects in one RCU read-side section and cause a stall.
Serialize disable-time cleanup with clear operations and report readers, then use kmemleak_cond_resched() in both report traversal loops to let RCU progress safely during long reads.
QEMU/KVM tests on mm-stable 6628e7d4c6b25:
* With 134 million real allocations and no injected delay, continuous RCU sections fell from 23.11-23.38 s to 126-972 us. Total reading took 23.11-23.38 s before and 23.67-24.09 s after. Neither kernel stalled.
* With identical 300 us per-node delays, only kernels without patch 2 stalled. Patch 1 eliminated overlapping cleanup entry.
* Under lazy/full preemption, 560 concurrent-removal cases, 20 deleted-chain cases and debugfs read checks passed with KASAN, lockdep and DEBUG_LIST.
Weilin Tong (2):
mm: kmemleak: serialize disable-time cleanup
mm: kmemleak: reschedule while reading reports
mm/kmemleak.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4