[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yo9baUjgXqM63vSS@n2.us-central1-a.c.spheric-algebra-350919.internal>
Date: Thu, 26 May 2022 10:50:17 +0000
From: Hyeonggon Yoo <42.hyeyoo@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Vlastimil Babka <vbabka@...e.cz>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>, patches@...ts.linux.dev,
Roman Gushchin <roman.gushchin@...ux.dev>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Alexander Potapenko <glider@...gle.com>
Subject: Re: [GIT PULL] slab for 5.19
On Wed, May 25, 2022 at 04:07:24PM -0700, Linus Torvalds wrote:
> On Wed, May 25, 2022 at 3:01 PM Vlastimil Babka <vbabka@...e.cz> wrote:
> >
> > Yes, running rcutorture will trigger that stackdepot allocation, but as
> > that's in RCU debugging part of config, I considered it in the same
> > category as enabling slub debugging.
>
> Yeah, I don't think rcutorture is a problem per se, it was more an
> example of a random interaction that doesn't actually seem to make
> much sense.
Creating cache with SLAB_STORE_USER is (currently) done in rcutorture.
SLAB_STORE_USER means "we're going to track every user of this slab
cache" so IMO it should not be done if not debugging.
Otherwise stackdepot will be used only when user passes slub_debug
boot parameter.
> As far as I can tell, there is nothing in rcutorture that actually
> wants that stack trace, and it seems to be doing just a test of the
> object dumping working.
dumping an arbitrary object may call kmem_dump_obj(), which will dump
slab objects and thus printing where it was allocated.
>
> So it was more the oddity and randomness of it that made me go
> "Whaah?" There might be others hiding elsewhere, that rcutorture use
> just happened to use the flag explicitly.
>
> Linus
AFAIK only 1) creating cache with SLAB_STORE_USER or 2) passing
slub_debug make kernel allocate hash table for stackdepot.
This do not look that odd too me.
But I agree not asking size of hash table to user and by 1) using
rhashtables or 2) deciding size of hash table at runtime would be
better :)
Powered by blists - more mailing lists