[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAENh_STUEtz4k9w9106sBha465thGgv5iOpdfneag1nbcEcDsg@mail.gmail.com>
Date: Mon, 14 Jul 2025 18:07:51 +0100
From: Matt Fleming <matt@...dmodwrite.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, kernel-team@...udflare.com,
Marco Elver <elver@...gle.com>, Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>, Dmitry Vyukov <dvyukov@...gle.com>,
Oscar Salvador <osalvador@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
Matt Fleming <mfleming@...udflare.com>
Subject: Re: [PATCH] stackdepot: Make max number of pools boot-time configurable
On Mon, Jul 14, 2025 at 3:33 PM Matt Fleming <matt@...dmodwrite.com> wrote:
>
> From: Matt Fleming <mfleming@...udflare.com>
>
> We're hitting the WARN in depot_init_pool() about reaching the stack
> depot limit because we have long stacks that don't dedup very well.
>
> Introduce a new start-up parameter to allow users to set the number of
> maximum stack depot pools.
>
> Signed-off-by: Matt Fleming <mfleming@...udflare.com>
> ---
Sorry, this is technically a v3 patch (even if it's very different to
v1 and v2) so I should've included a list of changes:
Changes in v3:
- Switch from build-time to boot-time parameter
Changes in v2:
- Replace BUILD_BUG_ON with static_assert()
- Hide STACKDEPOT_MAX_POOLS behind EXPERT
> .../admin-guide/kernel-parameters.txt | 5 ++
> lib/stackdepot.c | 55 +++++++++++++++++--
> 2 files changed, 56 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index b5cb36148554..6a6d60de4530 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -6542,6 +6542,11 @@
> consumed by the stack hash table. By default this is set
> to false.
>
> + stack_depot_max_pools= [KNL,EARLY]
> + Specify the maximum number of pools to use for storing
> + stack traces. Pools are allocated on-demand up to this
> + limit. Default value is 8191 pools.
> +
The default value is usually 8192 pools unless you're on arm64 with
64K pages in which case it's 8191. If this discrepancy is too
confusing I'm fine just deleting this final sentence from the help
text.
Powered by blists - more mailing lists