diff mbox

parisc: increase kernel stack size to 32k

Message ID 20130423202203.GA7287@p100.box (mailing list archive)
State Not Applicable
Headers show

Commit Message

Helge Deller April 23, 2013, 8:22 p.m. UTC
commit e4e1e78facf7565cada909a69c7fb6415b6e7b83
Author: Helge Deller <deller@gmx.de>
Date:   Tue Apr 23 17:19:37 2013 +0200

parisc: increase kernel stack size to 32k

This commit temporarily increases the kernel stack size to 32k to avoid
stack overflows which led to strange and hard-to-debug kernel crashes
all over various kernel components.

The upcoming real fix will implement an own irq stack which should avoid
those crashes without the need for 32k stacks.

Signed-off-by: Helge Deller <deller@gmx.de>

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Helge Deller April 24, 2013, 7:33 a.m. UTC | #1
On 04/23/2013 10:22 PM, Helge Deller wrote:
> commit e4e1e78facf7565cada909a69c7fb6415b6e7b83
> Author: Helge Deller <deller@gmx.de>
> Date:   Tue Apr 23 17:19:37 2013 +0200
> 
> parisc: increase kernel stack size to 32k
> 
> --- a/arch/parisc/include/asm/thread_info.h
> +++ b/arch/parisc/include/asm/thread_info.h
> -#define THREAD_SIZE_ORDER            2
> +#define THREAD_SIZE_ORDER            3	/* 32k stack */

I tested again, and it actually needs to be 64k stacks to not crash any longer.
So, the right temporary fix is:

> +#define THREAD_SIZE_ORDER            4	/* 64k stack */

Will send updated patch soon.

Helge
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
James Bottomley April 24, 2013, 8:41 p.m. UTC | #2
On Wed, 2013-04-24 at 09:33 +0200, Helge Deller wrote:
> On 04/23/2013 10:22 PM, Helge Deller wrote:
> > commit e4e1e78facf7565cada909a69c7fb6415b6e7b83
> > Author: Helge Deller <deller@gmx.de>
> > Date:   Tue Apr 23 17:19:37 2013 +0200
> > 
> > parisc: increase kernel stack size to 32k
> > 
> > --- a/arch/parisc/include/asm/thread_info.h
> > +++ b/arch/parisc/include/asm/thread_info.h
> > -#define THREAD_SIZE_ORDER            2
> > +#define THREAD_SIZE_ORDER            3	/* 32k stack */
> 
> I tested again, and it actually needs to be 64k stacks to not crash any longer.
> So, the right temporary fix is:
> 
> > +#define THREAD_SIZE_ORDER            4	/* 64k stack */
> 
> Will send updated patch soon.

This is an indicator of something seriously wrong somewhere.  We've
always had the 16k stack just because of our large frames.  In theory,
the IRQ stack should only be the same size as the kernel stack, so if we
have both in the same place, we should only need at max 32k ... if we're
still seeing problems related to stack overrun, then it might be we have
an IRQ recursion where we shouldn't have.  To be honest, I have a hard
time explaining why our stacks should be over 8k.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index d1fb79a..55335c1 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -40,7 +40,7 @@  struct thread_info {
 
 /* thread information allocation */
 
-#define THREAD_SIZE_ORDER            2
+#define THREAD_SIZE_ORDER            3	/* 32k stack */
 /* Be sure to hunt all references to this down when you change the size of
  * the kernel stack */
 #define THREAD_SIZE             (PAGE_SIZE << THREAD_SIZE_ORDER)