Received: from eggs.gnu.org ([2001:4830:134:3::10]:34624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHou6-0006dB-Mv for qemu-devel@nongnu.org; Tue, 28 Jun 2016 05:02:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHou5-0003KM-6t for qemu-devel@nongnu.org; Tue, 28 Jun 2016 05:01:58 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:32860 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHou4-0003K2-SU for qemu-devel@nongnu.org; Tue, 28 Jun 2016 05:01:57 -0400 From: Peter Lieven Date: Tue, 28 Jun 2016 11:01:27 +0200 Message-Id: <1467104499-27517-4-git-send-email-pl@kamp.de> In-Reply-To: <1467104499-27517-1-git-send-email-pl@kamp.de> References: <1467104499-27517-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCH 03/15] coroutine-ucontext: reduce stack size to 64kB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, mst@redhat.com, dgilbert@redhat.com, peter.maydell@linaro.org, kraxel@redhat.com, Peter Lieven evaluation with the recently introduced maximum stack size monitoring revealed that the actual used stack size was never above 4kB so allocating 1MB stack for each coroutine is a lot of wasted memory. So reduce the stack size to 64kB which should still give enough head room. Signed-off-by: Peter Lieven --- util/coroutine-ucontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 27c61f3..7f1d541 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -88,7 +88,7 @@ static void coroutine_trampoline(int i0, int i1) } } -#define COROUTINE_STACK_SIZE (1 << 20) +#define COROUTINE_STACK_SIZE (1 << 16) Coroutine *qemu_coroutine_new(void) { -- 1.9.1