public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-32: remove CONFIG_4KSTACKS
@ 2010-06-16  9:16 Christoph Hellwig
  2010-06-16 10:21 ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-06-16  9:16 UTC (permalink / raw)
  To: x86, linux-kernel

These days 4 kilobytes of stack just aren't enough for reliably operation,
and people using lots of threads have long switched to x86-64, so remove the
CONFIG_4KSTACKS option.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/arch/x86/Kconfig.debug
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig.debug	2010-06-16 10:24:06.902272433 +0200
+++ linux-2.6/arch/x86/Kconfig.debug	2010-06-16 10:24:11.837068354 +0200
@@ -121,15 +121,6 @@ config DEBUG_NX_TEST
 	  and the software setup of this feature.
 	  If in doubt, say "N"
 
-config 4KSTACKS
-	bool "Use 4Kb for kernel stacks instead of 8Kb"
-	depends on X86_32
-	---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.
-
 config DOUBLEFAULT
 	default y
 	bool "Enable doublefault exception handler" if EMBEDDED
Index: linux-2.6/arch/x86/include/asm/module.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/module.h	2010-06-16 10:24:06.922004449 +0200
+++ linux-2.6/arch/x86/include/asm/module.h	2010-06-16 10:24:23.255291640 +0200
@@ -60,12 +60,7 @@
 #endif
 
 #ifdef CONFIG_X86_32
-# ifdef CONFIG_4KSTACKS
-#  define MODULE_STACKSIZE "4KSTACKS "
-# else
-#  define MODULE_STACKSIZE ""
-# endif
-# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
+# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
 #endif
 
 #endif /* _ASM_X86_MODULE_H */
Index: linux-2.6/arch/x86/include/asm/page_32_types.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/page_32_types.h	2010-06-16 10:24:06.933273132 +0200
+++ linux-2.6/arch/x86/include/asm/page_32_types.h	2010-06-16 10:24:30.251005496 +0200
@@ -15,11 +15,7 @@
  */
 #define __PAGE_OFFSET		_AC(CONFIG_PAGE_OFFSET, UL)
 
-#ifdef CONFIG_4KSTACKS
-#define THREAD_ORDER	0
-#else
 #define THREAD_ORDER	1
-#endif
 #define THREAD_SIZE 	(PAGE_SIZE << THREAD_ORDER)
 
 #define STACKFAULT_STACK 0

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

* Re: [PATCH] x86-32: remove CONFIG_4KSTACKS
  2010-06-16 10:21 ` Alan Cox
@ 2010-06-16 10:20   ` Christoph Hellwig
  2010-06-16 10:23     ` Kyle McMartin
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-06-16 10:20 UTC (permalink / raw)
  To: Alan Cox; +Cc: Christoph Hellwig, x86, linux-kernel

On Wed, Jun 16, 2010 at 11:21:36AM +0100, Alan Cox wrote:
> On Wed, 16 Jun 2010 11:16:21 +0200
> Christoph Hellwig <hch@lst.de> wrote:
> 
> > These days 4 kilobytes of stack just aren't enough for reliably operation,
> > and people using lots of threads have long switched to x86-64, so remove the
> > CONFIG_4KSTACKS option.
> 
> It's very useful for things like debugging and because of the split
> kernel/irq stacks.

Ingo just ACKed my previous patch to make irq stacks unconditional.

> It also seems to be quite adequate for most
> configurations.

See the direct reclaim flamewar.  Currently we can end up in ->writepage
from af_unix poll code with over 3k stack alreay used.  It's certainly
not anywhere near enough.

> Perhaps XFS should select 8K stack instead ?

or rather !CONFIG_INSANE.  I don't care too much.  No one sane should
ever enable it anymore, but Ingo asked me to send a patch to remove it.

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

* Re: [PATCH] x86-32: remove CONFIG_4KSTACKS
  2010-06-16  9:16 [PATCH] x86-32: remove CONFIG_4KSTACKS Christoph Hellwig
@ 2010-06-16 10:21 ` Alan Cox
  2010-06-16 10:20   ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2010-06-16 10:21 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: x86, linux-kernel

On Wed, 16 Jun 2010 11:16:21 +0200
Christoph Hellwig <hch@lst.de> wrote:

> These days 4 kilobytes of stack just aren't enough for reliably operation,
> and people using lots of threads have long switched to x86-64, so remove the
> CONFIG_4KSTACKS option.

It's very useful for things like debugging and because of the split
kernel/irq stacks. It also seems to be quite adequate for most
configurations.

Perhaps XFS should select 8K stack instead ?

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

* Re: [PATCH] x86-32: remove CONFIG_4KSTACKS
  2010-06-16 10:20   ` Christoph Hellwig
@ 2010-06-16 10:23     ` Kyle McMartin
  2010-06-16 10:46       ` Milan Broz
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle McMartin @ 2010-06-16 10:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Alan Cox, x86, linux-kernel

On Wed, Jun 16, 2010 at 12:20:51PM +0200, Christoph Hellwig wrote:
> > Perhaps XFS should select 8K stack instead ?
> 
> or rather !CONFIG_INSANE.  I don't care too much.  No one sane should
> ever enable it anymore, but Ingo asked me to send a patch to remove it.
> 

Alan--

It's not just XFS, we were regularly seeing blown stacks on Fedora with
ext3/4 and encrypted disks using dm-crypt...

--Kyle

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

* Re: [PATCH] x86-32: remove CONFIG_4KSTACKS
  2010-06-16 10:23     ` Kyle McMartin
@ 2010-06-16 10:46       ` Milan Broz
  2010-06-16 10:49         ` Kyle McMartin
  0 siblings, 1 reply; 6+ messages in thread
From: Milan Broz @ 2010-06-16 10:46 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Christoph Hellwig, Alan Cox, x86, linux-kernel

On 06/16/2010 12:23 PM, Kyle McMartin wrote:
> On Wed, Jun 16, 2010 at 12:20:51PM +0200, Christoph Hellwig wrote:
>>> Perhaps XFS should select 8K stack instead ?
>>
>> or rather !CONFIG_INSANE.  I don't care too much.  No one sane should
>> ever enable it anymore, but Ingo asked me to send a patch to remove it.
>>
> 
> Alan--
> 
> It's not just XFS, we were regularly seeing blown stacks on Fedora with
> ext3/4 and encrypted disks using dm-crypt...

Can you point me to report where 4k stacks is not enough for plain dm-crypt?
IIRC it was always XFS (maybe ext4) on top of it what caused problem...

(Anyway, removing 4k stacks is probably good thing:-)

Milan

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

* Re: [PATCH] x86-32: remove CONFIG_4KSTACKS
  2010-06-16 10:46       ` Milan Broz
@ 2010-06-16 10:49         ` Kyle McMartin
  0 siblings, 0 replies; 6+ messages in thread
From: Kyle McMartin @ 2010-06-16 10:49 UTC (permalink / raw)
  To: Milan Broz; +Cc: Kyle McMartin, Christoph Hellwig, Alan Cox, x86, linux-kernel

On Wed, Jun 16, 2010 at 12:46:55PM +0200, Milan Broz wrote:
> Can you point me to report where 4k stacks is not enough for plain dm-crypt?
> IIRC it was always XFS (maybe ext4) on top of it what caused problem...
> 
> (Anyway, removing 4k stacks is probably good thing:-)
> 

LVM may have been involved as well, I can't recall. I'll try to dig up
the report from my email.

--Kyle

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

end of thread, other threads:[~2010-06-16 10:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16  9:16 [PATCH] x86-32: remove CONFIG_4KSTACKS Christoph Hellwig
2010-06-16 10:21 ` Alan Cox
2010-06-16 10:20   ` Christoph Hellwig
2010-06-16 10:23     ` Kyle McMartin
2010-06-16 10:46       ` Milan Broz
2010-06-16 10:49         ` Kyle McMartin

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