--- linux-2.6.7/arch/i386/Kconfig 2004/07/27 18:15:33 1.1 +++ linux-2.6.7/arch/i386/Kconfig 2004/07/27 18:16:05 @@ -1294,6 +1294,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 --- linux-2.6.7/arch/i386/kernel/irq.c 2004/07/11 19:47:05 1.1 +++ linux-2.6.7/arch/i386/kernel/irq.c 2004/07/11 19:47:26 @@ -77,7 +77,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 @@ -488,7 +488,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; @@ -1116,7 +1116,7 @@ } -#ifdef CONFIG_4KSTACKS +#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS) static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned"))); static char hardirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned"))); --- linux-2.6.7/include/asm-i386/irq.h 2004/07/11 19:43:37 1.1 +++ linux-2.6.7/include/asm-i386/irq.h 2004/07/11 19:44:06 @@ -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) */ --- linux-2.6.7/include/asm-i386/module.h 2004/07/11 19:43:37 1.1 +++ linux-2.6.7/include/asm-i386/module.h 2004/07/11 19:45:28 @@ -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 --- linux-2.6.7/include/asm-i386/thread_info.h 2004/07/11 19:43:37 1.1 +++ linux-2.6.7/include/asm-i386/thread_info.h 2004/07/11 19:45:09 @@ -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) /*