diff -ur linux-2.6.8/arch/i386/Kconfig linux-2.6.8-stk16/arch/i386/Kconfig --- linux-2.6.8/arch/i386/Kconfig 2004-08-14 00:36:17.000000000 -0500 +++ linux-2.6.8-stk16/arch/i386/Kconfig 2004-09-03 14:30:34.413653312 -0500 @@ -1298,6 +1298,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 -ur linux-2.6.8/arch/i386/kernel/irq.c linux-2.6.8-stk16/arch/i386/kernel/irq.c --- linux-2.6.8/arch/i386/kernel/irq.c 2004-08-14 00:36:14.000000000 -0500 +++ linux-2.6.8-stk16/arch/i386/kernel/irq.c 2004-09-03 14:30:34.415653008 -0500 @@ -76,7 +76,7 @@ /* * per-CPU IRQ handling stacks */ -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) union irq_ctx *hardirq_ctx[NR_CPUS]; union irq_ctx *softirq_ctx[NR_CPUS]; #endif @@ -487,7 +487,7 @@ * useful for irq hardware that does not mask cleanly in an * SMP environment. */ -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) for (;;) { irqreturn_t action_ret; @@ -1115,7 +1115,7 @@ } -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) /* * These should really be __section__(".bss.page_aligned") as well, but * gcc's 3.0 and earlier don't handle that correctly. diff -ur linux-2.6.8/include/asm-i386/irq.h linux-2.6.8-stk16/include/asm-i386/irq.h --- linux-2.6.8/include/asm-i386/irq.h 2004-08-14 00:37:25.000000000 -0500 +++ linux-2.6.8-stk16/include/asm-i386/irq.h 2004-09-03 14:30:34.416652856 -0500 @@ -31,7 +31,7 @@ #define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ #endif -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) /* * per-CPU IRQ handling contexts (thread information and stack) */ diff -ur linux-2.6.8/include/asm-i386/module.h linux-2.6.8-stk16/include/asm-i386/module.h --- linux-2.6.8/include/asm-i386/module.h 2004-08-14 00:36:17.000000000 -0500 +++ linux-2.6.8-stk16/include/asm-i386/module.h 2004-09-03 14:30:34.416652856 -0500 @@ -63,8 +63,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 -ur linux-2.6.8/include/asm-i386/thread_info.h linux-2.6.8-stk16/include/asm-i386/thread_info.h --- linux-2.6.8/include/asm-i386/thread_info.h 2004-08-14 00:36:17.000000000 -0500 +++ linux-2.6.8-stk16/include/asm-i386/thread_info.h 2004-09-03 14:30:34.417652704 -0500 @@ -55,8 +55,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) /*