Re: [PATCH 1/1] sparc64: unify thread stack sizing and add explicit 32KB stack

From: David Laight

Date: Thu Jun 18 2026 - 06:32:44 EST


On Thu, 18 Jun 2026 07:53:02 +0200
Andreas Larsson <andreas@xxxxxxxxxxx> wrote:

> On 2026-06-16 21:58, David Laight wrote:
...
> > That whole logic is impenetrable.
> > Why not set the 'desired thread size' in kB, then work out how many
> > pages that ends up being based on the page size, and finally get the actual
> > stack size.
> > I'm not sure, but with vmalloc()ed stacks and 8k pages can't you have 24kB?
>
> No, the next step up is 32 KiB as the stack allocation is sized by
> THREAD_SIZE_ORDER.

Maybe, but there is probably no reason why that has to be the case.
I'm sure I've seem other architectures increasing the stack size by 4k.

David

>
> Cheers,
> Andreas
>