[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/18] coroutine: reduce stack size to 60kB
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 18/18] coroutine: reduce stack size to 60kB |
Date: |
Tue, 27 Sep 2016 15:54:01 +0200 |
From: Peter Lieven <address@hidden>
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
60kB which should still give enough head room. The guard page added
in qemu_alloc_stack will catch a potential stack overflow introduced
by this commit. The 60kB + guard page will result in an allocation of
64kB per coroutine on systems where a page is 4kB.
Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
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 14d4f1d..be14260 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 61440
typedef enum {
COROUTINE_YIELD = 1,
--
1.8.3.1
- [Qemu-devel] [PULL 02/18] qemu: use bdrv_flush_all for vm_stop et al, (continued)
- [Qemu-devel] [PULL 02/18] qemu: use bdrv_flush_all for vm_stop et al, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 01/18] block: reintroduce bdrv_flush_all, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 03/18] block-backend: remove blk_flush_all, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 06/18] block/qapi: Use separate options type for curl driver, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 08/18] block: Parse 'detect-zeroes' in bdrv_open_common(), Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 04/18] block: Fix error path in qmp_blockdev_change_medium(), Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 11/18] block: Remove qemu_root_bds_opts, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 09/18] block: Use 'detect-zeroes' option for 'blockdev-change-medium', Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 16/18] coroutine-sigaltstack: use helper for allocating stack memory, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 10/18] block: Move 'discard' option to bdrv_open_common(), Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 18/18] coroutine: reduce stack size to 60kB,
Kevin Wolf <=
- [Qemu-devel] [PULL 07/18] block/qapi: Move 'aio' option to file driver, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 12/18] oslib-posix: add helpers for stack alloc and free, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 15/18] coroutine-ucontext: use helper for allocating stack memory, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 13/18] coroutine-sigaltstack: rename coroutine struct appropriately, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 14/18] coroutine: add a macro for the coroutine stack size, Kevin Wolf, 2016/09/27
- [Qemu-devel] [PULL 17/18] oslib-posix: add a configure switch to debug stack usage, Kevin Wolf, 2016/09/27
- Re: [Qemu-devel] [PULL 00/18] Block layer patches, Peter Maydell, 2016/09/27