LWN.net Logo

4K stacks by default?

4K stacks by default?

Posted Apr 24, 2008 21:48 UTC (Thu) by proski (subscriber, #104)
In reply to: 4K stacks by default? by jzbiciak
Parent article: 4K stacks by default?

Please check your logic.  That suggests that x86_64 is significantly less likely to run out of
8k than i386 out of 4k.

But if you are right about reduced usage of stack for automatic variables and parameter
passing, it means that 4k stacks could be attempted on x86_64.


(Log in to post comments)

4K stacks by default?

Posted Apr 24, 2008 22:44 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246) [Link]

There was a lengthier comment that indicated it wasn't a "4K on x86 vs. 8K on x86-64" situation that was quoted over on KernelTrap. That perhaps biased my reading of the quote above to not read the same into it that you did. That exchange was:

From: Eric Sandeen <sandeen@...>
Subject: Re: x86: 4kstacks default
Date: Apr 19, 10:36 pm 2008

Arjan van de Ven wrote:

> On the flipside the arguments tend to be
> 1) certain stackings of components still runs the risk of overflowing
> 2) I want to run ndiswrapper
> 3) general, unspecified uneasyness.
> 
> For 1), we need to know which they are, and then solve them, because even on x86-64 with 8k stacks
> they can be a problem (just because the stack frames are bigger, although not quite double, there).

Except, apparently, not, at least in my experience.

Ask the xfs guys if they see stack overflows on x86_64, or on x86.

I've personally never seen common stack problems with xfs on x86_64, but
it's very common on x86.  I don't have a great answer for why, but
that's my anecdotal evidence.

I agree that without this additional context it's easy to interpret the shorter quote the way you did. Sorry about that.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds