From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK32X-0006OE-6s for qemu-devel@nongnu.org; Mon, 04 Jul 2016 08:31:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK32W-0006W4-DM for qemu-devel@nongnu.org; Mon, 04 Jul 2016 08:31:53 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:54939 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK32W-0006Vn-2N for qemu-devel@nongnu.org; Mon, 04 Jul 2016 08:31:52 -0400 From: Peter Lieven Date: Mon, 4 Jul 2016 14:31:27 +0200 Message-Id: <1467635487-9329-7-git-send-email-pl@kamp.de> In-Reply-To: <1467635487-9329-1-git-send-email-pl@kamp.de> References: <1467635487-9329-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCH V2 6/6] coroutine: 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, eblake@redhat.com, rth@twiddle.net, Peter Lieven evaluation with the recently introduced maximum stack usage 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 --- include/qemu/coroutine_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h index eac323a..f84d777 100644 --- a/include/qemu/coroutine_int.h +++ b/include/qemu/coroutine_int.h @@ -28,7 +28,7 @@ #include "qemu/queue.h" #include "qemu/coroutine.h" -#define COROUTINE_STACK_SIZE (1 << 20) +#define COROUTINE_STACK_SIZE (1 << 16) typedef enum { COROUTINE_YIELD = 1, -- 1.9.1