Re: 4k stacks in 2.6

From: Brian Gerst (bgerst_at_didntduck.org)
Date: 05/27/04

  • Next message: Kumar, Sharath: "dev.c -- dev_queue_xmit-- Is the comment misleading or is it a bug??"
    Date:	Thu, 27 May 2004 10:18:40 -0400
    To: Andrea Arcangeli <andrea@suse.de>
    
    

    Andrea Arcangeli wrote:

    > On Thu, May 27, 2004 at 02:45:51PM +0200, Ingo Molnar wrote:
    >
    >>are a bit belated. I only reacted to Andrea's mail to clear up apparent
    >>misunderstandings about the impact and implementation of this feature.
    >
    >
    > note that there is something relevant to improve in the implementation,
    > that is the per-cpu irq stack size should be bigger than 4k, we use 16k
    > on x86-64, on x86 it should be 8k. Currently you're decreasing _both_
    > the normal kernel context and even the irq stack in some condition.
    > There's no good reason to decrease the irq stack too, that's cheap, it's
    > per-cpu.

    The problem on i386 (unlike x86-64) is that the thread_info struct sits
    at the bottom of the stack and is referenced by masking bits off %esp.
    So the stack size must be constant whether in process context or IRQ
    context.

    --
    				Brian Gerst
    -
    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: Kumar, Sharath: "dev.c -- dev_queue_xmit-- Is the comment misleading or is it a bug??"

    Relevant Pages

    • Re: 4k stacks in 2.6
      ... > misunderstandings about the impact and implementation of this feature. ... that is the per-cpu irq stack size should be bigger than 4k, ... the normal kernel context and even the irq stack in some condition. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] i386: always use 4k stacks
      ... and afaics no cache downsides (in fact the same irq stack ... memory is now reused for irqs instead of threadstack-du-jour, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)