diff -urN linux-2.6.11/arch/i386/Kconfig.debug linux-2.6.11-16kstacks/arch/i386/Kconfig.debug --- linux-2.6.11/arch/i386/Kconfig.debug 2005-03-02 02:38:09.000000000 -0500 +++ linux-2.6.11-16kstacks/arch/i386/Kconfig.debug 2005-03-02 10:31:23.000000000 -0500 @@ -55,6 +55,13 @@ on the VM subsystem for higher order allocations. This option will also use IRQ stacks to compensate for the reduced stackspace. +config 16KSTACKS + bool "Use 16Kb for kernel stacks instead of 8Kb" + help + If you say Y here the kernel will use a 16Kb stacksize for the + kernel stack attached to each process/thread. 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 diff -urN linux-2.6.11/arch/i386/defconfig linux-2.6.11-16kstacks/arch/i386/defconfig --- linux-2.6.11/arch/i386/defconfig 2005-03-02 02:38:13.000000000 -0500 +++ linux-2.6.11-16kstacks/arch/i386/defconfig 2005-03-02 10:31:23.000000000 -0500 @@ -1221,7 +1221,8 @@ CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_SPINLOCK_SLEEP=y # CONFIG_FRAME_POINTER is not set -CONFIG_4KSTACKS=y +# CONFIG_4KSTACKS is not set +CONFIG_16KSTACKS=y CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y diff -urN linux-2.6.11/arch/i386/kernel/irq.c linux-2.6.11-16kstacks/arch/i386/kernel/irq.c --- linux-2.6.11/arch/i386/kernel/irq.c 2005-03-02 02:37:48.000000000 -0500 +++ linux-2.6.11-16kstacks/arch/i386/kernel/irq.c 2005-03-02 10:31:23.000000000 -0500 @@ -27,7 +27,7 @@ } #endif -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) /* * per-CPU IRQ handling contexts (thread information and stack) */ @@ -49,7 +49,7 @@ { /* high bits used in ret_from_ code */ int irq = regs->orig_eax & 0xff; -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) union irq_ctx *curctx, *irqctx; u32 *isp; #endif @@ -70,7 +70,7 @@ } #endif -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) curctx = (union irq_ctx *) current_thread_info(); irqctx = hardirq_ctx[smp_processor_id()]; @@ -106,7 +106,7 @@ return 1; } -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) /* * These should really be __section__(".bss.page_aligned") as well, but diff -urN linux-2.6.11/include/asm-i386/irq.h linux-2.6.11-16kstacks/include/asm-i386/irq.h --- linux-2.6.11/include/asm-i386/irq.h 2005-03-02 02:38:13.000000000 -0500 +++ linux-2.6.11-16kstacks/include/asm-i386/irq.h 2005-03-02 10:31:23.000000000 -0500 @@ -27,7 +27,7 @@ # define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ #endif -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) extern void irq_ctx_init(int cpu); # define __ARCH_HAS_DO_SOFTIRQ #else diff -urN linux-2.6.11/include/asm-i386/module.h linux-2.6.11-16kstacks/include/asm-i386/module.h --- linux-2.6.11/include/asm-i386/module.h 2005-03-02 02:37:48.000000000 -0500 +++ linux-2.6.11-16kstacks/include/asm-i386/module.h 2005-03-02 10:31:23.000000000 -0500 @@ -65,8 +65,12 @@ #ifdef CONFIG_4KSTACKS #define MODULE_STACKSIZE "4KSTACKS " #else +#ifdef CONFIG_16KSTACKS +#define MODULE_STACKSIZE "16KSTACKS " +#else #define MODULE_STACKSIZE "" #endif +#endif #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE diff -urN linux-2.6.11/include/asm-i386/thread_info.h linux-2.6.11-16kstacks/include/asm-i386/thread_info.h --- linux-2.6.11/include/asm-i386/thread_info.h 2005-03-02 02:37:48.000000000 -0500 +++ linux-2.6.11-16kstacks/include/asm-i386/thread_info.h 2005-03-02 10:31:23.000000000 -0500 @@ -56,8 +56,12 @@ #ifdef CONFIG_4KSTACKS #define THREAD_SIZE (4096) #else +#ifdef CONFIG_16KSTACKS +#define THREAD_SIZE (16384) +#else #define THREAD_SIZE (8192) #endif +#endif #define STACK_WARN (THREAD_SIZE/8) /*