Re: [2.6 patch] i386: always use 4k stacks

From: Andi Kleen (ak_at_suse.de)
Date: 11/16/05

  • Next message: Christoph Hellwig: "[PATCH] common compat_sys_trimer_create"
    To: Arjan van de Ven <arjan@infradead.org>
    Date:	16 Nov 2005 13:57:36 +0100
    
    

    Arjan van de Ven <arjan@infradead.org> writes:

    > > I would like to contribute that listing with two non-technical reasons
    > > more:
    > >
    > > * Encourages good code. Due to the 4 Kb stacks patch several parts of
    > > the kernel have gone on diet, improving the quality of the code
    >
    > this argument I agree with. especially since 64 bit platforms have a
    > higher stack footprint by nature (bigger call frames and more to store
    > on the stack) and if x86 allows stackbloat, the other architectures get
    > in trouble and are going to need really large stacks.

    I think it's in general risky. It's like balancing without a safety
    net. Might be a nice hobby, but for real production you want a safety
    net. That's simple because there are likely some code paths through
    the code that need more stack space and that are rarely hit (and
    cannot be easily found by static analysis, e.g. if they involve
    indirect pointers or particularly complex configuration setups). With
    very tight stack space you're much nearer a crash in extreme
    situations than otherwise.

    So I think it's a bad idea to change this.

    -Andi (who prefers to have safety nets)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Christoph Hellwig: "[PATCH] common compat_sys_trimer_create"

    Relevant Pages

    • Re: [2.6 patch] i386: always use 4k stacks
      ... but for real production you want a safety ... That's simple because there are likely some code paths through ... Map a blank ro page beneath the address range when stack memory is ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • stack allocation and gcc
      ... later - but seems that gcc allocate stack space once and in this case it ... Waste of precious kernel stack space - and waste of d-cache. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [9fans] Van Jacobsens network stack restructure
      ... >> Plan 9 IP stack doesn't seem to have the lineage of the linux and bsd ... >> "They who can give up essential liberty for temporary ... >> safety, ... --Benjamin Franklin ...
      (comp.os.plan9)
    • Re: [9fans] Van Jacobsens network stack restructure
      ... > Plan 9 IP stack doesn't seem to have the lineage of the linux and bsd ... i am not intimate with the IP stack code, ... > "They who can give up essential liberty for temporary ... > safety, ...
      (comp.os.plan9)
    • Re: Multi-Threading Question
      ... This is because each thread has its own stack (where the local ... barriers to ensure safety. ... Jon Skeet - ... If replying to the group, please do not mail me too ...
      (microsoft.public.dotnet.framework)