From aeb5ae2bb0b31593a8f2c8b37861123a86ef23d8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 8 Jan 2008 19:58:47 +0000 Subject: [PATCH] Seems to be nothing for it except to raise DEFAULT_THREAD_STACK. Why is ppc so much more stack-hungry than before? --- mysql-stack.patch | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/mysql-stack.patch b/mysql-stack.patch index 3f9dd8e..7926e11 100644 --- a/mysql-stack.patch +++ b/mysql-stack.patch @@ -1,28 +1,37 @@ -Talk about silly byte-shaving ... the "stock" value does not work on s390x, -and probably not on some other platforms either. Knock it up to twice the -pre-5.0.33 value to have some margin for future changes in compiler, glibc, -etc. Suspect this number if "execution_constants" regression test fails. +Talk about silly byte-shaving ... the "stock" value of STACK_MIN_SIZE +does not work on s390x, and probably not on some other platforms either. +Knock it up to twice the pre-5.0.33 value to have some margin for future +changes in compiler, glibc, etc. Suspect this number if +"execution_constants" regression test fails. -As of 5.0.45 and F9, it seems 16384 isn't enough anymore (ppc fails). -But we can't raise it too much because it has to be less than -DEFAULT_THREAD_STACK / 8, and DEFAULT_THREAD_STACK is dependent on -SIZEOF_CHARP. (Could change DEFAULT_THREAD_STACK too if our backs are -to the wall, but I'd rather not.) +As of 5.0.45 and F9, it seems 16384 isn't enough anymore either (ppc fails, +and seems to now need something above 20000 --- why?). STACK_MIN_SIZE has +to be enough less than DEFAULT_THREAD_STACK / 8 to provide some headroom, +which means we are now also forced to raise DEFAULT_THREAD_STACK for 32-bit +arches. +diff -Naur mysql-5.0.45.orig/include/my_pthread.h mysql-5.0.45/include/my_pthread.h +--- mysql-5.0.45.orig/include/my_pthread.h 2007-07-04 09:06:05.000000000 -0400 ++++ mysql-5.0.45/include/my_pthread.h 2008-01-08 14:51:39.000000000 -0500 +@@ -737,7 +737,7 @@ + */ + #define DEFAULT_THREAD_STACK (256*1024L) + #else +-#define DEFAULT_THREAD_STACK (192*1024) ++#define DEFAULT_THREAD_STACK (256*1024) + #endif + #endif + diff -Naur mysql-5.0.45.orig/sql/mysql_priv.h mysql-5.0.45/sql/mysql_priv.h --- mysql-5.0.45.orig/sql/mysql_priv.h 2007-07-04 09:06:41.000000000 -0400 -+++ mysql-5.0.45/sql/mysql_priv.h 2008-01-08 13:32:45.000000000 -0500 -@@ -173,7 +173,11 @@ ++++ mysql-5.0.45/sql/mysql_priv.h 2008-01-08 14:51:55.000000000 -0500 +@@ -173,7 +173,7 @@ Feel free to raise this by the smallest amount you can to get the "execution_constants" test to pass. */ -#define STACK_MIN_SIZE 12000 // Abort if less stack during eval. -+#if SIZEOF_CHARP > 4 +#define STACK_MIN_SIZE 24576 // Abort if less stack during eval. -+#else -+#define STACK_MIN_SIZE 20000 // Abort if less stack during eval. -+#endif #define STACK_MIN_SIZE_FOR_OPEN 1024*80 #define STACK_BUFF_ALLOC 352 // For stack overrun checks