From patchwork Mon Apr 18 17:28:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 91814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 522A7B6FE1 for ; Tue, 19 Apr 2011 03:29:53 +1000 (EST) Received: from localhost ([::1]:34250 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBsGk-0007g3-Kk for incoming@patchwork.ozlabs.org; Mon, 18 Apr 2011 13:29:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBsGF-0007bt-E7 for qemu-devel@nongnu.org; Mon, 18 Apr 2011 13:29:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBsGE-0003Dd-AC for qemu-devel@nongnu.org; Mon, 18 Apr 2011 13:29:19 -0400 Received: from afflict.kos.to ([92.243.29.197]:53970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBsGE-0003Cn-5C for qemu-devel@nongnu.org; Mon, 18 Apr 2011 13:29:18 -0400 Received: from kos.to (a88-115-166-167.elisa-laajakaista.fi [88.115.166.167]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id EDD142668B; Mon, 18 Apr 2011 17:29:09 +0000 (UTC) Received: by kos.to (sSMTP sendmail emulation); Mon, 18 Apr 2011 20:29:06 +0300 From: Riku Voipio To: qemu-devel@nongnu.org Date: Mon, 18 Apr 2011 20:28:58 +0300 Message-Id: <2e9076fbc1e96e17640c5a46f105cc1974f25192.1303146624.git.riku.voipio@iki.fi> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 Cc: Riku Voipio Subject: [Qemu-devel] [PATCH 1/6] [v2] linux-user: bigger default stack X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Riku Voipio 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 Reviewed-by: Nathan Froyd --- 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) {