[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ef5c2539-735-42ef-89e0-ef142da415cd@google.com>
Date: Fri, 15 Jan 2021 11:41:07 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Johannes Berg <johannes@...solutions.net>
cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH v2] mm/slub: disable user tracing for kmemleak caches by
default
On Wed, 13 Jan 2021, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.com>
>
> If kmemleak is enabled, it uses a kmem cache for its own objects.
> These objects are used to hold information kmemleak uses, including
> a stack trace. If slub_debug is also turned on, each of them has
> *another* stack trace, so the overhead adds up, and on my tests (on
> ARCH=um, admittedly) 2/3rds of the allocations end up being doing
> the stack tracing.
>
> Turn off SLAB_STORE_USER if SLAB_NOLEAKTRACE was given, to avoid
> storing the essentially same data twice.
>
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Acked-by: David Rientjes <rientjes@...gle.com>
> ---
> Perhaps instead it should go the other way around, and kmemleak
> could even use/access the stack trace that's already in there ...
> But I don't really care too much, I can just turn off slub debug
> for the kmemleak caches via the command line anyway :-)
>
I think making the change to kmem_cache_flags() is likely the simplest.
Powered by blists - more mailing lists