public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Benjamin Block <bblock@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Benjamin Block <bblock@linux.ibm.com>
Subject: Re: [PATCH] debugobjects: Allow to configure the amount of pre-allocated objects
Date: Fri, 20 Mar 2026 16:26:07 +0100	[thread overview]
Message-ID: <878qbmjze8.ffs@tglx> (raw)
In-Reply-To: <70f06193b3c3581802710ebcef74671e50c4c979.1772035270.git.bblock@linux.ibm.com>

On Wed, Feb 25 2026 at 17:05, Benjamin Block wrote:
> On s390 it has been observed, that even with 16384 such pre-allocated
> objects ODEBUG would still be disabled during boot.
>
> Similarly to other debug features like KMEMLEAK add a Kconfig option
> CONFIG_DEBUG_OBJECTS_POOL_SIZE_SHIFT that allows to increase the amount
> of pre-allocated objects (in both the static and later dynamic cases).
> Use it as exponential, rather than linear value to allow for head-room
> to grow into once set in a configuration.
>
> The calculation is done as such:
>     N_OBJECTS = 2^DEBUG_OBJECTS_POOL_SIZE_SHIFT * N_BATCH
>
> By default it is set to 6, so the actual amount is unchanged, unless
> the new options is changed:
>     N_OBJECTS = 2^6 * 16
>     N_OBJECTS = 1024
>
> For the previously mentioned observations on s390 it was necessary to
> increase the option to 11 in order to have enough space during boot.

That doesn't make sense. The only phase where debug objects needs to
allocate from the preallocated static pool is the time before the memory
allocator becomes available. I doubt that this early boot phase eats 16k
or more objects.

This smells like the problem I fixed recently:

  fd3634312a04 ("debugobject: Make it work with deferred page initialization - again")

Looks that I missed to add a cc:stable for it.

Thanks,

        tglx






      parent reply	other threads:[~2026-03-20 15:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 16:05 [PATCH] debugobjects: Allow to configure the amount of pre-allocated objects Benjamin Block
2026-03-11 10:04 ` Benjamin Block
2026-03-11 17:47   ` Andrew Morton
2026-03-13 14:26     ` Benjamin Block
2026-03-14 22:06       ` Andrew Morton
2026-03-17 11:42         ` Benjamin Block
2026-03-20 15:26 ` Thomas Gleixner [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=878qbmjze8.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bblock@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.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