Skip to content

mm: kmemleak: Use a memory pool for kmemleak object allocations

Catalin Marinas linux-mm lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 14 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm: kmemleak: Make the tool tolerant to struct scan_area allocation failuresmm/kmemleak.c+10 -65 replies
2/3mm: kmemleak: Simple memory allocation pool for kmemleak objectsmm/kmemleak.c+52 -21 reply
3/3mm: kmemleak: Use the memory pool for early allocationsinit/main.c lib/Kconfig.debug mm/kmemleak.c+35 -2453 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] mm: kmemleak: Use a memory pool for kmemleak object allocations

Following the discussions on v2 of this patch(set) [1], this series takes slightly different approach:

- it implements its own simple memory pool that does not rely on the slab allocator

- drops the early log buffer logic entirely since it can now allocate metadata from the memory pool directly before kmemleak is fully initialised

- CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE option is renamed to CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE

- moves the kmemleak_init() call earlier (mm_init())

- to avoid a separate memory pool for struct scan_area, it makes the tool robust when such allocations fail as scan areas are rather an optimisation

[1] http://lkml.kernel.org/r/[email protected]

Catalin Marinas (3):
mm: kmemleak: Make the tool tolerant to struct scan_area allocation
failures
mm: kmemleak: Simple memory allocation pool for kmemleak objects
mm: kmemleak: Use the memory pool for early allocations

 init/main.c       |   2 +-
 lib/Kconfig.debug |  11 +-
 mm/kmemleak.c     | 325 ++++++++++++----------------------------------
 3 files changed, 91 insertions(+), 247 deletions(-)