All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] add static key for slub_debug
@ 2019-04-04  9:15 Vlastimil Babka
  2019-04-04  9:15 ` [RFC 1/2] mm, slub: introduce " Vlastimil Babka
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vlastimil Babka @ 2019-04-04  9:15 UTC (permalink / raw)
  To: linux-mm
  Cc: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, Mel Gorman, linux-kernel, Vlastimil Babka

Hi,

I looked a bit at SLUB debugging capabilities and first thing I noticed is
there's no static key guarding the runtime enablement as is common for similar
debugging functionalities, so here's a RFC to add it. Can be further improved
if there's interest.

It's true that in the alloc fast path the debugging check overhead is AFAICS
amortized by the per-cpu cache, i.e. when the allocation is from there, no
debugging functionality is performed. IMHO that's kinda a weakness, especially
for SLAB_STORE_USER, so I might also look at doing something about it, and then
the static key might be more critical for overhead reduction.

In the freeing fast path I quickly checked the stats and it seems that in
do_slab_free(), the "if (likely(page == c->page))" is not as likely as it
declares, as in the majority of cases, freeing doesn't happen on the object
that belongs to the page currently cached. So the advantage of a static key in
slow path __slab_free() should be more useful immediately.

Vlastimil Babka (2):
  mm, slub: introduce static key for slub_debug
  mm, slub: add missing kmem_cache_debug() checks

 mm/slub.c | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-04 21:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04  9:15 [RFC 0/2] add static key for slub_debug Vlastimil Babka
2019-04-04  9:15 ` [RFC 1/2] mm, slub: introduce " Vlastimil Babka
2019-04-04  9:15 ` [RFC 2/2] mm, slub: add missing kmem_cache_debug() checks Vlastimil Babka
2019-04-04 16:40   ` Christopher Lameter
2019-04-04 16:40     ` Christopher Lameter
2019-04-04 15:57 ` [RFC 0/2] add static key for slub_debug Christopher Lameter
2019-04-04 15:57   ` Christopher Lameter
2019-04-04 21:52   ` Vlastimil Babka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.