Skip to contentSkip to conversation

Warn about dangers of LVM/RAID stacking with 4KSTACKS

PATCH New Alexander Nyberg 1 participant 1 message Dec 10, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Warn about dangers of LVM/RAID stacking with 4KSTACKS

Hello Linus

On x86 using software RAID on disks and then putting them together in LVM as a logical volume uses alot of the stack. I've read reports of doing this on volumes which are shared via NFS causes stack overruns which it indeed does, I just reproduced it here.

We should play it safe and warn anyone before using CONFIG_4KSTACKS if the user intends to do software LVM/RAID stacking until this issue is resolved.

===== arch/i386/Kconfig.debug 1.4 vs edited =====

arch/i386/Kconfig.debug +6 -0
@@ -46,6 +46,8 @@ config DEBUG_PAGEALLOC
 	  This results in a large slowdown, but helps to find certain types
 	  of memory corruptions.
 
+comment "Please read help if you intend to stack software RAID and LVM"
+
 config 4KSTACKS
 	bool "Use 4Kb for kernel stacks instead of 8Kb"
 	help
@@ -54,6 +56,10 @@ config 4KSTACKS
 	  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.
+
+	  Don't enable this if you intend to stack RAID and LVM on top of
+	  each other. The stack may run out using this combination and
+	  then bad things will happen.
 
 config X86_FIND_SMP_CONFIG
 	bool