mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stian Halseth <stian@itx.no>
To: Imre Kaloz <kaloz@kernel.org>
Cc: Andreas Larsson <andreas@gaisler.com>,
	davem@davemloft.net,  sparclinux@vger.kernel.org,
	Tony Rodriguez <unixpro1970@gmail.com>,
	 linux-kernel@vger.kernel.org, david.laight.linux@gmail.com,
	 glaubitz@physik.fu-berlin.de, thuth@redhat.com,
	regressions@lists.linux.dev,  nroach44@nroach44.id.au
Subject: Re: [PATCH v2] sparc64: increase kernel thread stack size to 32K
Date: Sun, 27 Sep 2026 23:30:11 +0200	[thread overview]
Message-ID: <33811471d0a5c2a48b74132544761bfaa593bb63.camel@itx.no> (raw)
In-Reply-To: <20260927204912.3667-1-kaloz@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]

Hi Imre,

Sending V3 with two separate patches now.

Thank for the feedback and testing!

Stian

On Sun, 2026-09-27 at 22:49 +0200, Imre Kaloz wrote:
> Hi Stian,
> 
> I ran this on a Sun Ultra 45 (UltraSPARC IIIi, SMP). The unpatched
> kernel hits "corrupted stack end detected inside scheduler" in
> hub_power_on() on 10 out of 10 boots with USB devices attached. With
> the 32K stack it boots clean every time: 6 boots with the v1 diff,
> 10 more with the minimal diff below. A forced hub/device rebind with
> the stack tracer armed peaked at 15832 of 32768 bytes, so 32K looks
> like plenty here.
> 
> On v1, Andreas agreed with 32K but asked for the dead else branches
> to be pulled into their own patch with a fixup tag for 15b9350a177b,
> since that commit should have removed them already. v2 folds the
> removal into the same patch, so I'd split it back out for v3: the
> fix as the minimal diff below, the else-branch removal as its own
> patch on top. Nice work!
> 
> The minimal diff is below the scissors, feel free to fold it in.
> 
> Tested-by: Imre Kaloz <kaloz@kernel.org> # Sun Ultra 45
> 
> 
> Best,
> Imre
> 
> -- >8 --
> Signed-off-by: Imre Kaloz <kaloz@kernel.org>
> ---
> diff --git a/arch/sparc/include/asm/thread_info_64.h
> b/arch/sparc/include/asm/thread_info_64.h
> index c8a73dff27f8..ec552513d63c 100644
> --- a/arch/sparc/include/asm/thread_info_64.h
> +++ b/arch/sparc/include/asm/thread_info_64.h
> @@ -100,8 +100,8 @@ struct thread_info {
>  #define	FAULT_CODE_BAD_RA	0x20	/* Bad RA for
> sun4v		   */
>  
>  #if PAGE_SHIFT == 13
> -#define THREAD_SIZE (2*PAGE_SIZE)
> -#define THREAD_SHIFT (PAGE_SHIFT + 1)
> +#define THREAD_SIZE (4*PAGE_SIZE)
> +#define THREAD_SHIFT (PAGE_SHIFT + 2)
>  #else /* PAGE_SHIFT == 13 */
>  #define THREAD_SIZE PAGE_SIZE
>  #define THREAD_SHIFT PAGE_SHIFT
> @@ -129,7 +129,7 @@ extern struct thread_info
> *current_thread_info(void);
>  
>  /* thread information allocation */
>  #if PAGE_SHIFT == 13
> -#define THREAD_SIZE_ORDER	1
> +#define THREAD_SIZE_ORDER	2
>  #else /* PAGE_SHIFT == 13 */
>  #define THREAD_SIZE_ORDER	0
>  #endif /* PAGE_SHIFT == 13 */

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2026-09-27 21:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  7:57 [PATCH 0/1] sparc64: unify thread stack sizing and add explicit 32KB stack Tony Rodriguez
2026-05-19  7:57 ` [PATCH 1/1] " Tony Rodriguez
2026-05-19  8:56   ` Nathaniel Roach
2026-06-16 14:18   ` Andreas Larsson
2026-06-16 19:58     ` David Laight
2026-06-18  5:53       ` Andreas Larsson
2026-06-18  7:29         ` Tony Rodriguez
2026-06-18  8:57           ` David Laight
2026-06-18 10:32         ` David Laight
2026-05-19 10:02 ` [PATCH 0/1] " David Laight
2026-05-19 23:57   ` Tony Rodriguez
2026-05-20 13:41     ` David Laight
2026-08-31 17:27       ` Stian Halseth
2026-08-31 17:29 ` [PATCH v2] sparc64: increase kernel thread stack size to 32K Stian Halseth
2026-08-31 18:25   ` Tony Rodriguez
2026-08-31 18:54     ` Stian Halseth
2026-08-31 20:18       ` Tony Rodriguez
2026-08-31 21:05         ` Stian Halseth
2026-09-02  3:30           ` Tony Rodriguez
2026-09-11  7:13             ` Stian Halseth
2026-09-27 20:49   ` Imre Kaloz
2026-09-27 21:29     ` [PATCH v3 1/2] " Stian Halseth
2026-09-27 21:29       ` [PATCH v3 2/2] sparc64: remove dead THREAD_SIZE branches for non-8K pages Stian Halseth
2026-09-27 21:30     ` Stian Halseth [this message]
     [not found] <f3719bb0-e892-49cc-af82-79e2569a8a90@gmail.com>
2026-08-31 19:04 ` [PATCH v2] sparc64: increase kernel thread stack size to 32K Tony Rodriguez

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=33811471d0a5c2a48b74132544761bfaa593bb63.camel@itx.no \
    --to=stian@itx.no \
    --cc=andreas@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=david.laight.linux@gmail.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=kaloz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nroach44@nroach44.id.au \
    --cc=regressions@lists.linux.dev \
    --cc=sparclinux@vger.kernel.org \
    --cc=thuth@redhat.com \
    --cc=unixpro1970@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®