Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Yoo <harry@kernel.org>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Cc: Sang-Heon Jeon <ekffu200098@gmail.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@gentwo.org>,
	 David Rientjes <rientjes@google.com>, Hao Li <hao.li@linux.dev>,
	linux-mm@kvack.org,  Roman Gushchin <roman.gushchin@linux.dev>
Subject: Re: [PATCH v2] mm/slub: clamp slab_min_order to MAX_PAGE_ORDER
Date: Mon, 12 Oct 2026 15:09:31 +0100	[thread overview]
Message-ID: <aszp31zqP607YL18@thinkstation> (raw)
In-Reply-To: <5895ceec-df6a-4604-a7b9-8138212d786f@kernel.org>

On Mon, Oct 12, 2026 at 10:23:16AM +0200, Vlastimil Babka (SUSE) wrote:
> On 10/11/26 03:48, Sang-Heon Jeon wrote:
> > setup_slub_max_order() clamps slab_max_order to MAX_PAGE_ORDER, but
> > setup_slub_min_order() has no such clamp.
> > 
> > The buddy allocator cannot allocate more than 2^MAX_PAGE_ORDER pages
> > at once, so slab_min_order above it makes no sense.
> > 
> > If slab_min_order is set above MAX_PAGE_ORDER, it can even panic at
> > boot or invoke undefined behavior in order_objects().
> > 
> > So clamp slab_min_order to MAX_PAGE_ORDER as well.
> > 
> > Fixes: 81819f0fc828 ("SLUB core")
> > Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> 
> Hi,
> 
> this is effectively part of my bigger refactor here:

Ouch, I missed that point!

> https://lore.kernel.org/linux-mm/20260923-slub_tiny_rework-v1-1-a0e66d536eb5@kernel.org/

Looking forward to seeing further updates on this ...
(and hopefully do more review)

-- 
Cheers,
Harry / Hyeonggon


      parent reply	other threads:[~2026-10-12 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11  1:48 [PATCH v2] mm/slub: clamp slab_min_order to MAX_PAGE_ORDER Sang-Heon Jeon
2026-10-12  8:23 ` Vlastimil Babka (SUSE)
2026-10-12 13:21   ` Sang-Heon Jeon
2026-10-12 14:09   ` Harry Yoo [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=aszp31zqP607YL18@thinkstation \
    --to=harry@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=ekffu200098@gmail.com \
    --cc=hao.li@linux.dev \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox