login
Header Space

 
 

Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bodo Eggert <7eggert@...>
Cc: Matt Mackall <mpm@...>, Jeremy Fitzhardinge <jeremy@...>, Jesper Juhl <jesper.juhl@...>, Ray Lee <ray-lk@...>, Linux Kernel Mailing List <linux-kernel@...>, William Lee Irwin III <wli@...>, David Chinner <dgc@...>, Arjan van de Ven <arjan@...>
Date: Monday, July 16, 2007 - 6:28 pm

On 07/16/2007 03:43 PM, Bodo Eggert wrote:


Hnng. He was just saying that odds of two pages being buddies is quite 
small, not talking about literally two pages.


Given that as Arjan stated Fedora and even RHEL have been using 4K stacks 
for some time now, and certainly the latter being a distribution which I 
would expect to both host a relatively large number of lvm/md/xfs and what 
stackeaters have you users and to be fairly conservative with respect to the 
chances of scribbling over kernel memory (I'm a trusting person...) it seems 
  there might at this stage only be very few offenders left.

Seeing as how single-page stacks are much easier on the VM so that creating 
those zillion threads should also be faster, at _some_ percentage we get to 
say "and now to hell with the rest".

Do also note that with interrupts of the process stack, available stack is 
definitely not halved. I don't have data (if anyone reading does, please 
say) but I expect that on the kinds of busy networked systems that want 
many-thread creation to be fastest, their many concurrent interrupt sources 
might mean they are not actually experiencing less stack at all. That is, 
that "little extra security" you speak of might very well be none at all in 
practice and perhaps even negative.

Getting interrupts onto their own stack(s) certainly made for better (more 
deterministic that is) behaviour as well -- you're then independent on how 
deep into the stack you already are when the interrupt comes in which is 
otherwise anyone's guess. Now I must say I'm not particularly sure why you 
couldn't still also have those even if you don't pick 4K stacks, but as far 
as I'm aware they're a package deal at least today.

Single page stacks are much nicer on anyone. For all I care, that single 
page migth be a larger soft-page. No idea how the hell you'd investigate the 
optimum page-size for any given system, but I quite fully expect it's larger 
than 4K these days _anyway_ even on x86 and for modern loads.

Since Linux doesn't yet have those that's also not very important currently 
though. 4K is 1024 32-bit datums which isn't all that little if recursion is 
limited and programmers somewhat competent. With the interrupt stacks 
meaning available stack might not be worse or even _better_ for some 
systems, well, I's argue to just go with 4K if at all possible.

Rene.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH][RFC] 4K stacks default, not a debug thing any mo..., Rene Herman, (Mon Jul 16, 6:28 pm)
Re: [PATCH][RFC] 4K stacks default, not a debug thing any mo..., William Lee Irwin III, (Tue Jul 17, 1:01 pm)
speck-geostationary