All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Harry Yoo <harry@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Suren Baghdasaryan <surenb@google.com>, Hao Ge <hao.ge@linux.dev>,
	Kees Cook <kees@kernel.org>, Pedro Falcato <pfalcato@suse.de>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Danielle Constantino <dcostantino@meta.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC hotfixes 2/2] mm/slab: prevent unbounded recursion in free path with new kmalloc type
Date: Fri, 3 Jul 2026 10:20:25 +0200	[thread overview]
Message-ID: <2436707a-b6ab-45ec-98e5-538e18589462@kernel.org> (raw)
In-Reply-To: <b3f15af2-2c01-48bd-af87-e27df32388ea@kernel.org>

On 7/2/26 15:20, Harry Yoo wrote:
> 
> 
> On 7/2/26 9:57 PM, Vlastimil Babka (SUSE) wrote:
>>>
>>> To achieve this, create a new kmalloc type called KMALLOC_NO_OBJ_EXT.
>>> KMALLOC_NO_OBJ_EXT caches are created when CONFIG_SLAB_OBJ_EXT is
>>> enabled, and they have SLAB_NO_OBJ_EXT flag to prevent allocation
>>> of obj_exts arrays. They remain unused until allocation of obj_exts
>>> arrays for normal kmalloc caches happens.
>> 
>> I wonder if we should just use them always (not just for kmalloc_normal) if
>> we already have them. Would there be any downside?
> 
> Good point!
> 
> That's more intuitive and sounds like it's good to separate them because
> likely obj_exts will have longer lifetime than slab objects.
> 
> Not sure about impact on memory usage, need to check.
> I'd say it's fine as long as it doesn't clearly increase memory usage.

Yeah there might be more usage due to separate slabs, sheaves etc. But maybe
also less because the separated lifetime, thus potentially lower internal
fragmentation.

> But I guess that should not be part of bugfix as it's a functional
> change that is not required to fix the bug.

Ack.


      reply	other threads:[~2026-07-03  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02  4:09 [PATCH RFC hotfixes 0/2] mm/slab: fix unbounded recursion in free path with memalloc profiling Harry Yoo (Oracle)
2026-07-02  4:09 ` [PATCH RFC hotfixes 1/2] mm/slab: decouple SLAB_NO_SHEAVES from SLAB_NO_OBJ_EXT Harry Yoo (Oracle)
2026-07-02 12:49   ` Vlastimil Babka (SUSE)
2026-07-02  4:09 ` [PATCH RFC hotfixes 2/2] mm/slab: prevent unbounded recursion in free path with new kmalloc type Harry Yoo (Oracle)
2026-07-02 12:57   ` Vlastimil Babka (SUSE)
2026-07-02 13:20     ` Harry Yoo
2026-07-03  8:20       ` Vlastimil Babka (SUSE) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2436707a-b6ab-45ec-98e5-538e18589462@kernel.org \
    --to=vbabka@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=dcostantino@meta.com \
    --cc=hao.ge@linux.dev \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pfalcato@suse.de \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.