Re: [PATCH v3 3/3] mm: kmemleak: Use the memory pool for early allocations

2019-08-13 Thread Catalin Marinas
On Tue, Aug 13, 2019 at 08:35:54AM -0400, Qian Cai wrote: > On Mon, 2019-08-12 at 17:06 +0100, Catalin Marinas wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index 4d39540011e2..39df06ffd9f4 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -592,17 +592,18 @@

Re: [PATCH v3 3/3] mm: kmemleak: Use the memory pool for early allocations

2019-08-13 Thread Qian Cai
On Mon, 2019-08-12 at 17:06 +0100, Catalin Marinas wrote: > Currently kmemleak uses a static early_log buffer to trace all memory > allocation/freeing before the slab allocator is initialised. Such early > log is replayed during kmemleak_init() to properly initialise the > kmemleak metadata for

Re: [PATCH v3 3/3] mm: kmemleak: Use the memory pool for early allocations

2019-08-13 Thread Catalin Marinas
On Mon, Aug 12, 2019 at 05:06:42PM +0100, Catalin Marinas wrote: > @@ -466,9 +419,13 @@ static struct kmemleak_object *mem_pool_alloc(gfp_t gfp) > struct kmemleak_object *object; > > /* try the slab allocator first */ > - object = kmem_cache_alloc(object_cache,

[PATCH v3 3/3] mm: kmemleak: Use the memory pool for early allocations

2019-08-12 Thread Catalin Marinas
Currently kmemleak uses a static early_log buffer to trace all memory allocation/freeing before the slab allocator is initialised. Such early log is replayed during kmemleak_init() to properly initialise the kmemleak metadata for objects allocated up that point. With a memory pool that does not