i386: enable 4k stacks by default
PATCH 1/1 i386: enable 4k stacks by default
This patch enables 4k stacks by default.
4k stacks have become a well-tested feature used fore a long time in Fedora and even in RHEL 4.
There are no known problems in in-kernel code with 4k stacks still present after Neil's patch that went into -mm nearly two months ago.
Defaulting to 4k stacks in -mm kernel will give some more testing coverage and should show whether there are really no problems left.
Keeping the option for now should make the people happy who want to use the experimental -mm kernel but don't trust the well-tested 4k stacks.
arch/i386/Kconfig.debug renamed from arch/i386/Kconfig.debug.old +2 -2
@@ -53,8 +53,8 @@ If in doubt, say "N". config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNEL + 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
Quoted 20 lines · Adrian Bunk
This patch enables 4k stacks by default.
4k stacks have become a well-tested feature used fore a long time in Fedora and even in RHEL 4.
There are no known problems in in-kernel code with 4k stacks still present after Neil's patch that went into -mm nearly two months ago.
Defaulting to 4k stacks in -mm kernel will give some more testing coverage and should show whether there are really no problems left.
Keeping the option for now should make the people happy who want to use the experimental -mm kernel but don't trust the well-tested 4k stacks.
Signed-off-by Adrian Bunk <[email protected]>
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 line 56
Quoted 6 lines
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 renamed from arch/i386/Kconfig.debug.old 2006-01-04 11:43:55.000000000 +0100 +1
-2@@ -53,8 +53,8 @@ If in doubt, say "N". config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNEL
Why "if DEBUG_KERNEL" ?
--
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
Quoted 23 lines · Jesper Juhl
Quoted 22 lines · Adrian Bunk
This patch enables 4k stacks by default.
4k stacks have become a well-tested feature used fore a long time in Fedora and even in RHEL 4.
There are no known problems in in-kernel code with 4k stacks still present after Neil's patch that went into -mm nearly two months ago.
Defaulting to 4k stacks in -mm kernel will give some more testing coverage and should show whether there are really no problems left.
Keeping the option for now should make the people happy who want to use the experimental -mm kernel but don't trust the well-tested 4k stacks.
Signed-off-by Adrian Bunk <[email protected]>arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 renamed from arch/i386/Kconfig.debug.old 2006-01-04 11:43:55.000000000 +0100 +0
-0@@ -53,8 +53,8 @@ If in doubt, say "N".
Quoted 6 lines
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 line 56
Quoted 4 lines
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 renamed from arch/i386/Kconfig.debug.old 2006-01-04 11:43:55.000000000 +0100 +1
-2config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNELWhy "if
DEBUG_KERNEL" ?
This is simply the same as before with the defaults inverted.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 24 lines · Adrian Bunk
Quoted 23 lines · Jesper Juhl
Quoted 22 lines · Adrian Bunk
This patch enables 4k stacks by default.
4k stacks have become a well-tested feature used fore a long time in Fedora and even in RHEL 4.
There are no known problems in in-kernel code with 4k stacks still present after Neil's patch that went into -mm nearly two months ago.
Defaulting to 4k stacks in -mm kernel will give some more testing coverage and should show whether there are really no problems left.
Keeping the option for now should make the people happy who want to use the experimental -mm kernel but don't trust the well-tested 4k stacks.
Signed-off-by Adrian Bunk <[email protected]>arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 renamed from arch/i386/Kconfig.debug.old 2006-01-04 11:43:55.000000000 +0100 +0
-0@@ -53,8 +53,8 @@ If in doubt, say "N".
Quoted 9 lines
Quoted 6 lines
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 line 56
Quoted 4 lines
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 renamed from arch/i386/Kconfig.debug.old 2006-01-04 11:43:55.000000000 +0100 +1
-2config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNELWhy "if
DEBUG_KERNEL" ?This is simply the same as before with the defaults inverted.
I just thought that you wanted to get as much testing in -mm as possible while still leaving the old stacksize option for those who don't yet trust 4K stacks.
To get maximum testing making 4KSTACKS default Y and removing the "if DEBUG_KERNEL" conditional just seems to me to be the obvious choice...
--
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
Quoted 32 lines · Jesper Juhl
Quoted 31 lines · Adrian Bunk
Quoted 29 lines · Jesper Juhl
Quoted 20 lines · Adrian Bunk
This patch enables 4k stacks by default.
4k stacks have become a well-tested feature used fore a long time in Fedora and even in RHEL 4.
There are no known problems in in-kernel code with 4k stacks still present after Neil's patch that went into -mm nearly two months ago.
Defaulting to 4k stacks in -mm kernel will give some more testing coverage and should show whether there are really no problems left.
Keeping the option for now should make the people happy who want to use the experimental -mm kernel but don't trust the well-tested 4k stacks.
Signed-off-by Adrian Bunk <[email protected]>arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 line 56
Quoted 6 lines
arch/i386/Kconfig.debug 2006-01-04 11:44:14.000000000 +0100 renamed from arch/i386/Kconfig.debug.old 2006-01-04 11:43:55.000000000 +0100 +1
-2@@ -53,8 +53,8 @@ If in doubt, say "N". config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNELWhy "if
DEBUG_KERNEL" ?
Quoted 5 lines
Quoted 2 lines
This is simply the same as before with the defaults inverted.
I just thought that you wanted to get as much testing in -mm as possible while still leaving the old stacksize option for those who don't yet trust 4K stacks.
That is what my patch does.
Quoted 2 lines
To get maximum testing making 4KSTACKS default Y and removing the "if
DEBUG_KERNEL" conditional just seems to me to be the obvious choice...
With my version, we are getting the bigger testing coverage - and getting a big testing coverage in -mm is what we need if we want to know whether we have really already fixed all stack problems or whether there are any left.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 9 lines · Adrian Bunk
Quoted 2 lines · Jesper Juhl
To get maximum testing making 4KSTACKS default Y and removing the "if
DEBUG_KERNEL" conditional just seems to me to be the obvious choice...With my version, we are getting the bigger testing coverage - and getting a big testing coverage in -mm is what we need if we want to know whether we have really already fixed all stack problems or whether there are any left.
Ok, I guess I didn't make myself as clear as I thought. What I meant was that if 4K stacks are always enabled by default, then you'll get more testing than if only people who enable DEBUG_KERNEL are able to turn it on.
So I guess what I'm really aiming at is to either move the option up a level - that is, remove its dependency on CONFIG_DEBUG_KERNEL, or turn the option on its head and make it an option to enable 8K stacks instead and make that option then default to N (I like the first aproach better though).
Something like this :
--- linux-2.6.15-orig/arch/i386/Kconfig.debug 2006-01-03
04:21:10.000000000 +0100
+++ linux-2.6.15/arch/i386/Kconfig.debug 2006-01-04
19:08:43.000000000 +0100
@@ -44,7 +44,7 @@
config 4KSTACKS
bool "Use 4Kb for kernel stacks instead of 8Kb"
- depends on DEBUG_KERNEL
+ 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
--
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
Quoted 10 lines · Jesper Juhl
Quoted 9 lines · Adrian Bunk
Quoted 2 lines · Jesper Juhl
To get maximum testing making 4KSTACKS default Y and removing the "if
DEBUG_KERNEL" conditional just seems to me to be the obvious choice...With my version, we are getting the bigger testing coverage - and getting a big testing coverage in -mm is what we need if we want to know whether we have really already fixed all stack problems or whether there are any left.
Quoted 5 lines
Ok, I guess I didn't make myself as clear as I thought. What I meant was that if 4K stacks are always enabled by default, then you'll get more testing than if only people who enable
DEBUG_KERNELare able to turn it on.
...
This is not what my patch does.
Please apply my patch, use DEBUG_KERNEL=n and you'll understand it.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 17 lines · Adrian Bunk
Quoted 10 lines · Jesper Juhl
Quoted 9 lines · Adrian Bunk
Quoted 2 lines · Jesper Juhl
To get maximum testing making 4KSTACKS default Y and removing the "if
DEBUG_KERNEL" conditional just seems to me to be the obvious choice...With my version, we are getting the bigger testing coverage - and getting a big testing coverage in -mm is what we need if we want to know whether we have really already fixed all stack problems or whether there are any left.
Quoted 5 lines
Ok, I guess I didn't make myself as clear as I thought. What I meant was that if 4K stacks are always enabled by default, then you'll get more testing than if only people who enable
DEBUG_KERNELare able to turn it on.
...
Quoted 4 lines
This is not what my patch does.
Please apply my patch, use DEBUG_KERNEL=n and you'll understand it.
I see now what it is your patch does. I misread it - sorry - should have just downloaded it and tried it.
It does exactely what I thought it didn't do - I like it :-)
--
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
Quoted 27 lines · Adrian Bunk
This patch enables 4k stacks by default.
4k stacks have become a well-tested feature used fore a long time in Fedora and even in RHEL 4.
There are no known problems in in-kernel code with 4k stacks still present after Neil's patch that went into -mm nearly two months ago.
Defaulting to 4k stacks in -mm kernel will give some more testing coverage and should show whether there are really no problems left.
Keeping the option for now should make the people happy who want to use the experimental -mm kernel but don't trust the well-tested 4k stacks.
Signed-off-by Adrian Bunk <[email protected]>arch/i386/Kconfig.debug renamed from arch/i386/Kconfig.debug.old +0
-0@@ -53,8 +53,8 @@ If in doubt, say "N".config 4KSTACKS
arch/i386/Kconfig.debug renamed from arch/i386/Kconfig.debug.old +2
-2- bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNEL + default y
Quoted 3 lines
help
If you say Y here the kernel will use a 4Kb stacksize for the kernel stack attached to each process/thread. This facilitates
Perhaps mention 4k + 4k stacks, the separate irq stacks used with 4k option?
Grant.
Quoted 6 lines · Grant Coady
On Wed, 4 Jan 2006 15:51:38 +0100, Adrian Bunk <[email protected]> wrote:
...Quoted 2 lines
If you say Y here the kernel will use a 4Kb stacksize for the kernel stack attached to each process/thread. This facilitates
Perhaps mention 4k + 4k stacks, the separate irq stacks used with 4k option?
Feel free to submit a patch. ;-)
Quoted 1 line
Grant.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 9 lines · Adrian Bunk
Quoted 6 lines · Grant Coady
On Wed, 4 Jan 2006 15:51:38 +0100, Adrian Bunk <[email protected]> wrote:
...Quoted 2 lines
If you say Y here the kernel will use a 4Kb stacksize for the kernel stack attached to each process/thread. This facilitates
Perhaps mention 4k + 4k stacks, the separate irq stacks used with 4k option?
Feel free to submit a patch. ;-)
Okay :)
Based on Adrian Bunk's patch, default to 4k +4k stacks and making it more obvious that available stack space is not being halved. Compile tested.
--- Kconfig.debug | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
arch/i386/Kconfig.debug +4 -3
@@ -53,14 +53,15 @@ of memory corruptions. config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL + bool "Use 4Kb + 4Kb for kernel stacks instead of 8Kb" if DEBUG_KERNEL + 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 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. + will also use separate 4Kb IRQ stacks to compensate for the + reduced stackspace. config X86_FIND_SMP_CONFIG bool