mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6 patch] i386: always use 4k stacks
@ 2005-12-15 21:24 Adrian Bunk
  2005-12-15 22:00 ` Andrew Morton
  0 siblings, 1 reply; 99+ messages in thread
From: Adrian Bunk @ 2005-12-15 21:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Arjan van de Ven

It seems most problems with 4k stacks are already resolved at least
in -mm.

I'd like to see this patch to always use 4k stacks in -mm now for 
finding any remaining problems before submitting this patch for Linus' 
tree.


Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Arjan van de Ven <arjan@infradead.org>

---

This patch was already sent on:
- 11 Dec 2005
- 5 Dec 2005
- 30 Nov 2005
- 23 Nov 2005
- 14 Nov 2005

 arch/i386/Kconfig.debug        |   10 ----------
 arch/i386/kernel/irq.c         |   10 ----------
 include/asm-i386/irq.h         |   11 +++--------
 include/asm-i386/module.h      |    8 +-------
 include/asm-i386/thread_info.h |    6 +-----
 5 files changed, 5 insertions(+), 40 deletions(-)

--- linux-2.6.14-mm2-full/arch/i386/Kconfig.debug.old	2005-11-14 01:30:54.000000000 +0100
+++ linux-2.6.14-mm2-full/arch/i386/Kconfig.debug	2005-11-14 01:31:06.000000000 +0100
@@ -52,16 +52,6 @@
 	  portion of the kernel code won't be covered by a 2MB TLB anymore.
 	  If in doubt, say "N".
 
-config 4KSTACKS
-	bool "Use 4Kb for kernel stacks instead of 8Kb"
-	depends on DEBUG_KERNEL
-	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.14-mm2-full/include/asm-i386/irq.h.old	2005-11-14 01:31:18.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-i386/irq.h	2005-11-14 01:31:29.000000000 +0100
@@ -27,14 +27,9 @@
 # define ARCH_HAS_NMI_WATCHDOG		/* See include/linux/nmi.h */
 #endif
 
-#ifdef CONFIG_4KSTACKS
-  extern void irq_ctx_init(int cpu);
-  extern void irq_ctx_exit(int cpu);
-# define __ARCH_HAS_DO_SOFTIRQ
-#else
-# define irq_ctx_init(cpu) do { } while (0)
-# define irq_ctx_exit(cpu) do { } while (0)
-#endif
+extern void irq_ctx_init(int cpu);
+extern void irq_ctx_exit(int cpu);
+#define __ARCH_HAS_DO_SOFTIRQ
 
 #ifdef CONFIG_IRQBALANCE
 extern int irqbalance_disable(char *str);
--- linux-2.6.14-mm2-full/include/asm-i386/thread_info.h.old	2005-11-14 01:31:45.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-i386/thread_info.h	2005-11-14 01:32:11.000000000 +0100
@@ -53,11 +53,7 @@
 #endif
 
 #define PREEMPT_ACTIVE		0x10000000
-#ifdef CONFIG_4KSTACKS
-#define THREAD_SIZE            (4096)
-#else
-#define THREAD_SIZE		(8192)
-#endif
+#define THREAD_SIZE		(4096)
 
 #define STACK_WARN             (THREAD_SIZE/8)
 /*
--- linux-2.6.14-mm2-full/include/asm-i386/module.h.old	2005-11-14 01:32:18.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-i386/module.h	2005-11-14 01:32:42.000000000 +0100
@@ -64,12 +64,6 @@
 #define MODULE_REGPARM ""
 #endif
 
-#ifdef CONFIG_4KSTACKS
-#define MODULE_STACKSIZE "4KSTACKS "
-#else
-#define MODULE_STACKSIZE ""
-#endif
-
-#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE
+#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM
 
 #endif /* _ASM_I386_MODULE_H */

--- linux-2.6.15-rc5-mm2-full/arch/i386/kernel/irq.c.old	2005-12-11 15:10:27.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/i386/kernel/irq.c	2005-12-11 15:11:29.000000000 +0100
@@ -33,7 +33,6 @@
 }
 #endif
 
-#ifdef CONFIG_4KSTACKS
 /*
  * per-CPU IRQ handling contexts (thread information and stack)
  */
@@ -44,7 +43,6 @@
 
 static union irq_ctx *hardirq_ctx[NR_CPUS];
 static union irq_ctx *softirq_ctx[NR_CPUS];
-#endif
 
 /*
  * do_IRQ handles all normal device IRQ's (the special
@@ -55,10 +53,8 @@
 {	
 	/* high bits used in ret_from_ code */
 	int irq = regs->orig_eax & 0xff;
-#ifdef CONFIG_4KSTACKS
 	union irq_ctx *curctx, *irqctx;
 	u32 *isp;
-#endif
 
 	irq_enter();
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
@@ -76,8 +72,6 @@
 	}
 #endif
 
-#ifdef CONFIG_4KSTACKS
-
 	curctx = (union irq_ctx *) current_thread_info();
 	irqctx = hardirq_ctx[smp_processor_id()];
 
@@ -104,7 +98,6 @@
 			: "memory", "cc", "ecx"
 		);
 	} else
-#endif
 		__do_IRQ(irq, regs);
 
 	irq_exit();
@@ -114,8 +107,6 @@
 	return 1;
 }
 
-#ifdef CONFIG_4KSTACKS
-
 /*
  * These should really be __section__(".bss.page_aligned") as well, but
  * gcc's 3.0 and earlier don't handle that correctly.
@@ -200,7 +191,6 @@
 }
 
 EXPORT_SYMBOL(do_softirq);
-#endif
 
 /*
  * Interrupt statistics:

^ permalink raw reply	[flat|nested] 99+ messages in thread

end of thread, other threads:[~2005-12-21 20:03 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-15 21:24 [2.6 patch] i386: always use 4k stacks Adrian Bunk
2005-12-15 22:00 ` Andrew Morton
2005-12-15 20:42   ` Jeff V. Merkey
2005-12-15 22:30   ` Adrian Bunk
2005-12-15 21:07     ` Jeff V. Merkey
2005-12-15 23:14       ` Lee Revell
2005-12-15 21:46         ` Jeff V. Merkey
2005-12-15 23:26           ` Lee Revell
2005-12-15 22:04             ` Jeff V. Merkey
2005-12-15 23:36               ` Ismail Donmez
2005-12-16  0:08               ` Fri, 16 Dec 2005 01:08:02 +0100
2005-12-15 22:51                 ` Jeff V. Merkey
2005-12-16  0:57                 ` Michael Buesch
2005-12-16  0:38               ` Alan Cox
2005-12-16 14:39             ` linux-os (Dick Johnson)
2005-12-16 14:49               ` Xavier Bestel
2005-12-16 15:01               ` Adrian Bunk
2005-12-16 18:42               ` Horst von Brand
2005-12-16 18:53                 ` Oliver Neukum
2005-12-16 18:53                 ` Brian Gerst
2005-12-16 19:02                   ` Arjan van de Ven
2005-12-16 19:14                     ` Oliver Neukum
2005-12-16 18:55                 ` Steven Rostedt
2005-12-17  0:16                   ` Horst von Brand
2005-12-19  9:40                     ` Helge Hafting
2005-12-16 19:26                 ` linux-os (Dick Johnson)
2005-12-16 21:08                   ` David Lang
2005-12-16 21:35                     ` linux-os (Dick Johnson)
2005-12-19  9:02               ` Helge Hafting
2005-12-16  0:37         ` Ray Lee
2005-12-19  8:55           ` Helge Hafting
2005-12-15 23:15     ` Dave Jones
2005-12-16  0:47       ` Adrian Bunk
2005-12-16  0:50         ` Dave Jones
2005-12-16  2:56           ` Neil Brown
2005-12-16  3:06             ` Dave Jones
2005-12-16 12:18             ` Adrian Bunk
2005-12-16 19:03               ` Horst von Brand
2005-12-19  0:45               ` Neil Brown
2005-12-19  1:34                 ` Adrian Bunk
2005-12-19 11:40                   ` Jörn Engel
2005-12-16  1:15         ` Nathan Scott
2005-12-16  1:37           ` Dave Jones
2005-12-16  1:49     ` Zwane Mwaikambo
2005-12-16 14:12       ` Adrian Bunk
2005-12-16 13:10   ` Diego Calleja
2005-12-16 14:04     ` Adrian Bunk
2005-12-16 15:35       ` Diego Calleja
2005-12-16 15:49         ` Kyle Moffett
2005-12-16 16:23           ` Michael Buesch
2005-12-16 20:02             ` Alan Cox
2005-12-16 20:08               ` Arjan van de Ven
2005-12-16 18:18           ` Giridhar Pemmasani
2005-12-16 18:36             ` Arjan van de Ven
2005-12-16 19:32               ` Mike Snitzer
2005-12-16 19:46                 ` Arjan van de Ven
2005-12-16 21:28                   ` Mike Snitzer
2005-12-16 21:49                     ` Arjan van de Ven
2005-12-16 21:50                     ` Adrian Bunk
2005-12-16 22:14                       ` Dave Jones
2005-12-17 17:44           ` Andi Kleen
2005-12-17 20:16             ` Kyle Moffett
2005-12-17 20:23               ` Paul Rolland
2005-12-17 20:47                 ` Arjan van de Ven
2005-12-17 20:52             ` Adrian Bunk
2005-12-18  2:35               ` Andi Kleen
2005-12-18  5:03               ` Parag Warudkar
2005-12-18  5:43                 ` Andi Kleen
2005-12-18  6:05                   ` Parag Warudkar
2005-12-18 15:51                     ` Adrian Bunk
2005-12-18 15:59                       ` Parag Warudkar
2005-12-19 11:09                     ` Helge Hafting
2005-12-19 16:22                       ` Parag Warudkar
2005-12-19 17:43                         ` Dumitru Ciobarcianu
2005-12-19 19:10                           ` Parag Warudkar
2005-12-19 19:27                             ` Dumitru Ciobarcianu
2005-12-19 20:17                               ` Parag Warudkar
2005-12-19 20:34                                 ` Dumitru Ciobarcianu
2005-12-20  1:24                                   ` Tue, 20 Dec 2005 02:24:16 +0100
2005-12-20 14:28                                 ` Horst von Brand
2005-12-20 17:56                                   ` David Lang
2005-12-20 18:09                                     ` Arjan van de Ven
2005-12-20 18:49                                       ` David Lang
2005-12-21 11:12                                       ` Sander
2005-12-21 20:03                                         ` Jeffrey Hundstad
2005-12-20 18:12                                     ` Adrian Bunk
     [not found]                                     ` <55454.10.10.10.28.1135102356.squirrel@linux1>
2005-12-20 18:12                                       ` Sean
2005-12-20 18:23                                     ` Dave Jones
2005-12-20 12:58                             ` Adrian Bunk
2005-12-20 14:35                             ` Felix Oxley
2005-12-18 15:44                   ` Adrian Bunk
2005-12-18 12:09                 ` Adrian Bunk
2005-12-18 15:49                   ` Parag Warudkar
2005-12-18 15:57                     ` Adrian Bunk
2005-12-18 16:04                       ` Parag Warudkar
2005-12-16 15:58         ` Adrian Bunk
2005-12-16 16:46     ` Arjan van de Ven
     [not found]       ` <170fa0d20512160902g26eefc2eua519617d3e760de@mail.gmail.com>
2005-12-16 17:17         ` Fwd: " Mike Snitzer
2005-12-16 19:59           ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®