Skip to contentSkip to conversation

Adjust stack size for x86 and tune default pool size

PATCH New Jan Kiszka 1 participant 1 message Feb 24, 2009

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Adjust stack size for x86 and tune default pool size

Given that x86-64 pushes quad words on the stack, we should better double its default size (just like PowerPC does). And as 64-bit archs uses larger task stacks, doubling their default stack pool size is a good idea, too.

---

 include/asm-x86/system_64.h |    2 +-
 ksrc/nucleus/Kconfig        |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
include/asm-x86/system_64.h +1 -1
index b02faa3..18310a4 100644
@@ -28,7 +28,7 @@
 #include <linux/ptrace.h>
 #include <asm-generic/xenomai/system.h>
 
-#define XNARCH_THREAD_STACKSZ	4096
+#define XNARCH_THREAD_STACKSZ	8192
 
 #define xnarch_stack_size(tcb)  ((tcb)->stacksize)
 #define xnarch_stack_base(tcb)	((tcb)->stackbase)
ksrc/nucleus/Kconfig +5 -5
index eb262ce..1d6a566 100644
@@ -186,16 +186,16 @@ config XENO_OPT_SYS_HEAPSZ
 config XENO_OPT_SYS_STACKPOOLSZ
         depends on XENO_GENERIC_STACKPOOL
 	int "Size of the private stack pool (Kb)"
-	default 32
-	range 0 128
+	default 32 if !64BIT && !BLACKFIN
+	default 64 if 64BIT || BLACKFIN
 	help
 
 	On this architecture, kernel-based Xenomai threads get the
 	stack space they need from a private memory pool.  If you
 	don't start any kernel-based thread (i.e. no RTDM driver
-	thread, and no real-time task created from an application
-	embodied into a kernel module), you may leave a zero value for
-	this option. The size is expressed in Kilobytes.
+	thread, no real-time task created from an application embodied
+	into a kernel module, no switchtest driver), you may leave a
+	zero value for this option. The size is expressed in Kilobytes.
 
 if !XENO_GENERIC_STACKPOOL
 config XENO_OPT_SYS_STACKPOOLSZ