Skip to contentSkip to conversation

4KSTACKS no longer a debug feature and doesn't belong in "Kernel hacking".

PATCH In review Jesper Juhl 2 participants 8 messages Aug 12, 2007 SuperH

lore
Share & tools
lore
#0 lore raw

cover 4KSTACKS no longer a debug feature and doesn't belong in "Kernel hacking".

Hi,

The short story:
This is a series of 5 patches to a) lift 4KSTACKS from a debug feature to a non-debug feature and b) move it out of the Kernel hacking menu and into the Processor types and features menu and c) make it 'default y', but only for -mm.

Some more explanation is probably needed, so here's the longer story:
About a month back I posted a RFC patch with the subject "[PATCH][RFC] 4K stacks default, not a debug thing any more...?" to find out if I was right in assuming that 4K stacks were no longer considered a debug only feature and whether or not it would be sensible to make them default. You can find the head of the thread (100+ mesages) in the lkml.org archives
here: http://lkml.org/lkml/2007/7/11/294 .

Based on the comments in that thread I conclude that 4KSTACKS are not really considered a debug-only feature any longer, but the time is not right (yet) to make them the default - and it's certainly not yet the time to get rid of 8K stacks.

In that thread I promised to provide some patches that would lift 4KSTACKS out of debug-only feature status, which is what the first two patches in this series do.
I also said I would provide a patch to make 4KSTACKS 'default y' to get more testing, but restrict that patch to -mm - that's the fifth patch in this series.
Patches 3 & 4 in this series move the config option out of the Kernel hacking menu and into Processor types and features - this makes sense once it is no longer a debug feature and the location is in line with m68knommu (which is the only arch with this config symbol in addition to i386 & sh) which already place that symbol there.

Now for a bit on the actual patches. These are the patches in this series :

[PATCH 1/5] 4KSTACKS, remove DEBUG_KERNEL dependency for i386 [PATCH 2/5] 4KSTACKS, remove DEBUG_KERNEL dependency for sh [PATCH 3/5] 4KSTACKS, move out of Kernel hacking menu (i386) [PATCH 4/5] 4KSTACKS, move out of Kernel hacking menu (sh) [PATCH 5/5] 4KSTACKS, make 'default y', -mm patch only.

Andrew; as i386 & -mm maintainer I'm sending you patches 1, 3 & 5 - patches 2 & 4 for Super-H I would like a maintainer ACK on before they go further, so I'm not Cc'ing you on those (they are on LKML if you want them anyway).

Paul; in the thread I mention above I was focusing 100% on i386. I don't really know the status of 4KSTACKS on sh, so I'd like your input.

I'm adding a few people from the previous thread to Cc, but far from everyone as then the Cc list would become too big. For the patches themselves I'm just sending them to LKML, Andrew & Paul, so pick them up on LKML please (sending as replies to this mail).

Kind regards,
Jesper Juhl

#1 lore raw

PATCH 1/5 4KSTACKS, remove DEBUG_KERNEL dependency for i386

4K Stacks is no longer a debug feature, so remove the DEBUG_KERNEL dependancy for 4KSTACKS for i386.

---

arch/i386/Kconfig.debug +0 -1
index f03531e..7131a16 100644
@@ -58,7 +58,6 @@ config DEBUG_RODATA
 
 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
#2 lore raw

PATCH 2/5 4KSTACKS, remove DEBUG_KERNEL dependency for sh

In reply to Jesper Juhl

4K Stacks is no longer a debug feature, so remove the DEBUG_KERNEL dependancy for 4KSTACKS for sh.

---

arch/sh/Kconfig.debug +0 -1
index 52f6a99..5bb4bd7 100644
@@ -74,7 +74,6 @@ config DEBUG_STACK_USAGE
 
 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
#3 lore raw

Re: [PATCH 2/5] 4KSTACKS, remove DEBUG_KERNEL dependency for sh

Quoted 4 lines · Jesper Juhl

4K Stacks is no longer a debug feature, so remove the DEBUG_KERNEL dependancy for 4KSTACKS for sh.

While it may no longer be a debugging feature on i386, it certainly is on sh. It should stay under DEBUG_KERNEL for now.

#4 lore raw

Re: [PATCH 2/5] 4KSTACKS, remove DEBUG_KERNEL dependency for sh

Quoted 9 lines · Paul Mundt
Quoted 4 lines · Jesper Juhl

4K Stacks is no longer a debug feature, so remove the DEBUG_KERNEL dependancy for 4KSTACKS for sh.

While it may no longer be a debugging feature on i386, it certainly is on sh. It should stay under DEBUG_KERNEL for now.

Ok. That was the kind of clear response I was looking for - thank you Paul.

Signature · 3 lines
Jesper Juhl <[email protected]>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
#5 lore raw

PATCH 3/5 4KSTACKS, move out of Kernel hacking menu (i386)

In reply to Jesper Juhl

Since 4KSTACKS is nolonger a debug only feature, move it out of the Kernel Hacking menu (i386).

---

arch/i386/Kconfig +9 -0
index f952493..d4988cd 100644
@@ -922,6 +922,15 @@ config COMPAT_VDSO
 
 	  If unsure, say Y.
 
+config 4KSTACKS
+	bool "Use 4Kb for kernel stacks instead of 8Kb"
+	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.
+
 endmenu
 
 config ARCH_ENABLE_MEMORY_HOTPLUG
arch/i386/Kconfig.debug +0 -9
index 7131a16..90cc3a0 100644
@@ -56,15 +56,6 @@ config DEBUG_RODATA
 	  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"
-	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
#6 lore raw

PATCH 4/5 4KSTACKS, move out of Kernel hacking menu (sh)

In reply to Jesper Juhl

Since 4KSTACKS is nolonger a debug only feature, move it out of the Kernel Hacking menu (sh).

---

arch/sh/Kconfig +9 -0
index 54878f0..43e79f4 100644
@@ -205,6 +205,15 @@ config CPU_HAS_PTEA
 config CPU_HAS_DSP
 	bool
 
+config 4KSTACKS
+	bool "Use 4Kb for kernel stacks instead of 8Kb"
+	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.
+
 endmenu
 
 menu "Board support"
arch/sh/Kconfig.debug +0 -9
index 5bb4bd7..0c2992b 100644
@@ -72,15 +72,6 @@ config DEBUG_STACK_USAGE
 
 	  This option will slow down process creation somewhat.
 
-config 4KSTACKS
-	bool "Use 4Kb for kernel stacks instead of 8Kb"
-	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 SH_KGDB
 	bool "Include KGDB kernel debugger"
 	select FRAME_POINTER
#7 lore raw

PATCH 5/5 4KSTACKS, make 'default y', -mm patch only.

In reply to Jesper Juhl

To get more testing of 4K Stacks, make the feature 'default y'.

note: this patch is *NOT* intended for mainline atm, only for -mm.

---

arch/i386/Kconfig +1 -0
index d4988cd..15b1a25 100644
@@ -924,6 +924,7 @@ config COMPAT_VDSO
 
 config 4KSTACKS
 	bool "Use 4Kb for kernel stacks instead of 8Kb"
+	default y
 	help
 	  If you say Y here the kernel will use a 4Kb stacksize for the
 	  kernel stack attached to each process/thread. This facilitates