[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 42/42] coroutine: reduce stack size to 64kB
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 42/42] coroutine: reduce stack size to 64kB |
Date: |
Mon, 5 Sep 2016 20:13:54 +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
64kB 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.
Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Paolo Bonzini <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..fd71172 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.8.3.1
- [Qemu-block] [PULL 34/42] block jobs: Improve error message for missing job ID, (continued)
- [Qemu-block] [PULL 34/42] block jobs: Improve error message for missing job ID, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 35/42] qemu-iotests: Log QMP traffic in debug mode, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 36/42] block: Allow node name for 'qemu-io' HMP command, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 38/42] coroutine: add a macro for the coroutine stack size, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 37/42] oslib-posix: add helpers for stack alloc and free, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 33/42] coroutine: Assert that no locks are held on termination, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 40/42] coroutine-sigaltstack: use helper for allocating stack memory, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 39/42] coroutine-ucontext: use helper for allocating stack memory, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 41/42] oslib-posix: add a configure switch to debug stack usage, Kevin Wolf, 2016/09/05
- [Qemu-block] [PULL 42/42] coroutine: reduce stack size to 64kB,
Kevin Wolf <=
- Re: [Qemu-block] [Qemu-devel] [PULL 00/42] Block layer patches, Peter Maydell, 2016/09/06
- Re: [Qemu-block] [Qemu-devel] [PULL 00/42] Block layer patches, Peter Maydell, 2016/09/06
- Re: [Qemu-block] [Qemu-devel] [PULL 00/42] Block layer patches, Peter Maydell, 2016/09/06