]> git.proxmox.com Git - qemu.git/commitdiff
[v2] linux-user: bigger default stack
authorRiku Voipio <riku.voipio@nokia.com>
Fri, 4 Mar 2011 13:27:29 +0000 (15:27 +0200)
committerRiku Voipio <riku.voipio@iki.fi>
Tue, 26 Apr 2011 07:15:40 +0000 (10:15 +0300)
PTHREAD_STACK_MIN (16KB) is somewhat inadequate for a new stack for new
QEMU threads. Set new limit to 256K which should be enough, yet doesn't
increase memory pressure significantly.

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
linux-user/syscall.c

index bb0999d1abe73b337570478ae94dfc572bbe8511..732f71a6a03d3e5600029eedd39e9e5953a6ca5b 100644 (file)
@@ -3690,9 +3690,9 @@ static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
 
 #endif /* defined(TARGET_I386) */
 
-#if defined(CONFIG_USE_NPTL)
+#define NEW_STACK_SIZE 0x40000
 
-#define NEW_STACK_SIZE PTHREAD_STACK_MIN
+#if defined(CONFIG_USE_NPTL)
 
 static pthread_mutex_t clone_lock = PTHREAD_MUTEX_INITIALIZER;
 typedef struct {
@@ -3736,9 +3736,6 @@ static void *clone_func(void *arg)
     return NULL;
 }
 #else
-/* this stack is the equivalent of the kernel stack associated with a
-   thread/process */
-#define NEW_STACK_SIZE 8192
 
 static int clone_func(void *arg)
 {