[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] [v2] linux-user: bigger default stack
From: |
Riku Voipio |
Subject: |
[Qemu-devel] [PATCH 1/6] [v2] linux-user: bigger default stack |
Date: |
Mon, 18 Apr 2011 20:28:58 +0300 |
From: Riku Voipio <address@hidden>
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 <address@hidden>
Reviewed-by: Nathan Froyd <address@hidden>
---
linux-user/syscall.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index bb0999d..732f71a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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)
{
--
1.7.1
- [Qemu-devel] [PATCH 0/6] linux-user: pending patches, Riku Voipio, 2011/04/18
- [Qemu-devel] [PATCH 2/6] linux-user: improve traces, Riku Voipio, 2011/04/18
- [Qemu-devel] [PATCH 1/6] [v2] linux-user: bigger default stack,
Riku Voipio <=
- [Qemu-devel] [PATCH 3/6] linux-user: convert ioctl(SIOCGIFCONF, ...) result., Riku Voipio, 2011/04/18
- [Qemu-devel] [PATCH 4/6] linux-user: add ioctl(SIOCGIWNAME, ...) support., Riku Voipio, 2011/04/18
- [Qemu-devel] [PATCH 5/6] linux-user: add s390x to llseek list, Riku Voipio, 2011/04/18
- [Qemu-devel] [PATCH 6/6] linux-user: untie syscalls from UID16, Riku Voipio, 2011/04/18