[2.6 patch] let 4KSTACKS depend on EXPERIMENTAL and XFS on 4KSTACKS=n

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 07/20/04

  • Next message: Geert Uytterhoeven: "[PATCH] depends on PCI: Multi-Tech, SyncLink, Applicom serial"
    Date:	Tue, 20 Jul 2004 21:50:12 +0200
    To: "Jeffrey E. Hundstad" <jeffrey.hundstad@mnsu.edu>, Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>, Steve Lord <lord@xfs.org>
    
    

    On Tue, Jul 20, 2004 at 09:39:21AM -0500, Jeffrey E. Hundstad wrote:
    > Steve Lord wrote:
    >
    > >Don't use 4K stacks and XFS. What you hit here is a path where the
    > >filesystem is getting full and it needs to free some reserved space
    > >by flushing cached data which is using reserved extents. Reserved
    > >extents do not yet have an on disk address and they include a
    > >reservation for the worst case metadata usage. Flushing them will
    > >get you room back.
    > >
    > >As you can see, it is a pretty deep call stack, most of XFS is going
    > >to work just fine with a 4K stack, but there are end cases like
    > >this one which will just not fit.
    >
    >
    > If this is a known truth with XFS maybe it would be a good idea to have
    > 4K stacks and XFS be an impossible combination using the config tool.

    The patch below does:

    1. let 4KSTACKS depend on EXPERIMENTAL
    Rationale:
    4Kb stacks on i386 are the future. But currently this option might still
    cause problems in some areas of the kernel. OTOH, 4Kb stacks isn't a big
    gain for most people.
    2.6 is a stable kernel series, and 4KSTACKS=n is the safe choice.
    Once all issues with 4KSTACKS=y are resolved this can be reverted.

    2. let XFS depend on (4KSTACKS=n || BROKEN)
    Rationale:
    Mark Loy said:
      Don't use 4K stacks and XFS.
    Mark this combination as BROKEN until XFS is fixed.
    This might result in XFS support disappearing for some people, but if
    they use EXPERIMENTAL=y they should know what they are doing.

    The 4KSTACKS option has to be moved for that it's asked before XFS in
    "make config".

    diffstat output:
     arch/i386/Kconfig | 19 ++++++++++---------
     fs/Kconfig | 1 +
     2 files changed, 11 insertions(+), 9 deletions(-)

    Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

    --- linux-2.6.8-rc2-full/arch/i386/Kconfig.old 2004-07-20 21:00:32.000000000 +0200
    +++ linux-2.6.8-rc2-full/arch/i386/Kconfig 2004-07-20 21:03:30.000000000 +0200
    @@ -865,6 +865,16 @@
             generate incorrect output with certain kernel constructs when
             -mregparm=3 is used.
     
    +config 4KSTACKS
    + bool "Use 4Kb for kernel stacks instead of 8Kb"
    + depends on EXPERIMENTAL
    + help
    + If you say Y here the kernel will use a 4Kb stacksize for the
    + kernel stack attached to each process/thread. This facilitates
    + running more threads on a system and also reduces the pressure
    + on the VM subsystem for higher order allocations. This option
    + will also use IRQ stacks to compensate for the reduced stackspace.
    +
     endmenu
     
     
    @@ -1289,15 +1299,6 @@
               If you don't debug the kernel, you can say N, but we may not be able
               to solve problems without frame pointers.
     
    -config 4KSTACKS
    - bool "Use 4Kb for kernel stacks instead of 8Kb"
    - help
    - If you say Y here the kernel will use a 4Kb stacksize for the
    - kernel stack attached to each process/thread. This facilitates
    - running more threads on a system and also reduces the pressure
    - on the VM subsystem for higher order allocations. This option
    - will also use IRQ stacks to compensate for the reduced stackspace.
    -
     config X86_FIND_SMP_CONFIG
             bool
             depends on X86_LOCAL_APIC || X86_VOYAGER
    --- linux-2.6.8-rc2-full/fs/Kconfig.old 2004-07-20 21:04:02.000000000 +0200
    +++ linux-2.6.8-rc2-full/fs/Kconfig 2004-07-20 21:04:25.000000000 +0200
    @@ -294,6 +294,7 @@
     
     config XFS_FS
             tristate "XFS filesystem support"
    + depends on (4KSTACKS=n || BROKEN)
             help
               XFS is a high performance journaling filesystem which originated
               on the SGI IRIX platform. It is completely multi-threaded, can
    -
    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: Geert Uytterhoeven: "[PATCH] depends on PCI: Multi-Tech, SyncLink, Applicom serial"

    Relevant Pages

    • Re: 4K stack kernel get Oops in Filesystem stress test
      ... > by flushing cached data which is using reserved extents. ... > reservation for the worst case metadata usage. ... If this is a known truth with XFS maybe it would be a good idea to have ...
      (Linux-Kernel)
    • Re: [2.6 patch] let 4KSTACKS depend on EXPERIMENTAL and XFS on 4KSTACKS=n
      ... >> Mark this combination as BROKEN until XFS is fixed. ... > that people hit with 4K stacks so we can try to address ... and this causes the linux kernel to hang. ...
      (Linux-Kernel)
    • Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...?
      ... because it is known to cause problems with 4K stacks. ... I believe it could be concluded that it's not something in any sense fundamentally unfixable and the question becomes why XFS isn't fixed... ... I've heard about also in this thread are MD/LVM/XFS. ... Good to have pointed out, thanks, but as far as I'm concerned both these cases do not get a say in what's default configuration for the kernel.org kernel. ...
      (Linux-Kernel)
    • Re: [2.6 patch] let 4KSTACKS depend on EXPERIMENTAL and XFS on 4KSTACKS=n
      ... > probably can with 8K stacks but it will be much harder, ... The correct solution is to fix XFS (and other problems with 4kb stacks ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] i386: always use 4k stacks
      ... >>> Would you run a desktop with an nfs server on xfs on lvm on dm on SCSI? ... >> It isn't that 4k stacks were completely untested. ... XFS got fixed and Neil's patch should fix the rest of the problem. ... -mm is a pretty experimental kernel and everything using it knows about ...
      (Linux-Kernel)