[PATCH v3 2/2] coroutine: take exactly one batch from global pool at a time

2020-10-16 Thread wanghonghao
`qemu_coroutine_new` after initial allocations. Signed-off-by: wanghonghao --- util/qemu-coroutine.c | 63 --- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index 38fb6d3084..46e5073796 100644

[PATCH v3 1/2] QSLIST: add atomic replace operation

2020-10-16 Thread wanghonghao
Replace a queue with another atomicly. It's useful when we need to transfer queues between threads. Signed-off-by: wanghonghao --- include/qemu/queue.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/queue.h b/include/qemu/queue.h index e029e7bf66..1f0cbdf87e 100644

[PATCH v2 1/2] QSLIST: add atomic replace operation

2020-08-24 Thread wanghonghao
Replace a queue with another atomicly. It's useful when we need to transfer queues between threads. Signed-off-by: wanghonghao --- include/qemu/queue.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/queue.h b/include/qemu/queue.h index 456a5b01ee..62efad2438 100644

[PATCH v2 2/2] coroutine: take exactly one batch from global pool at a time

2020-08-24 Thread wanghonghao
`qemu_coroutine_new` after initial allocations. Signed-off-by: wanghonghao --- util/qemu-coroutine.c | 63 --- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index c3caa6c770..9202ec9c85 100644

[PATCH 2/2] coroutine: take exactly one batch from global pool at a time

2020-08-23 Thread wanghonghao
`qemu_coroutine_new` after initial allocations. Signed-off-by: wanghonghao --- util/qemu-coroutine.c | 63 --- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index c3caa6c770..070d492edc 100644

[PATCH 1/2] QSLIST: add atomic replace operation

2020-08-23 Thread wanghonghao
Replace a queue with another atomicly. It's useful when we need to transfer queues between threads. Signed-off-by: wanghonghao --- include/qemu/queue.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/queue.h b/include/qemu/queue.h index 456a5b01ee..a3ff544193 100644

[PATCH 2/2] coroutine: take exactly one batch from global pool at a time

2020-08-13 Thread wanghonghao
`qemu_coroutine_new` after initial allocations. Signed-off-by: wanghonghao --- util/qemu-coroutine.c | 63 --- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index c3caa6c770..02cd68bc4a 100644

[PATCH 1/2] QSLIST: add atomic replace operation

2020-08-13 Thread wanghonghao
Replace a queue with another atomicly. It's useful when we need to transfer queues between threads. Signed-off-by: wanghonghao --- include/qemu/queue.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/queue.h b/include/qemu/queue.h index 456a5b01ee..a3ff544193 100644