[Qemu-devel] [PATCH v3 1/1] coroutine-lock: do not touch coroutine after another one has been entered

2017-06-01 Thread Roman Pen
the first backtrace. The fix is obvious: use temporary queue and do not touch coroutine after first qemu_coroutine_enter() is invoked. The issue is quite rare and happens every ~12 hours on very high IO and CPU load (building linux kernel with -j512 inside guest) when IO throttling is enabled. With t

[Qemu-devel] [PATCH 1/1] i386/kvm: do not zero out segment flags if segment is unusable or not present

2017-06-01 Thread Roman Pen
CAJrWOzD6Xq==b-zYCDdFLgSRMPM-NkNuTSDFEtX=7mret45...@mail.gmail.com [2] Message id: 5d120f358612d73fc909f5bfa47e7bd082db0af0.1429841474.git.l...@kernel.org Signed-off-by: Roman Pen Signed-off-by: Mikhail Sennikovskii Cc: Paolo Bonzini Cc: Rddadim Krčmář Cc: Michael Chapman Cc: qemu-devel@nongnu.

[Qemu-devel] [PATCH v2 1/1] coroutine-lock: do not touch coroutine after another one has been entered

2017-05-30 Thread Roman Pen
the first backtrace. The fix is obvious: use temporary queue and do not touch coroutine after first qemu_coroutine_enter() is invoked. The issue is quite rare and happens every ~12 hours on very high IO and CPU load (building linux kernel with -j512 inside guest) when IO throttling is enabled. With t

[Qemu-devel] [PATCH 1/1] coroutine-lock: do not touch coroutine after another one has been entered

2017-05-30 Thread Roman Pen
m the first backtrace. The fix is obvious: use temporal queue and do not touch coroutine after first qemu_coroutine_enter() is invoked. The issue is quite rare and happens every ~12 hours on very high IO load (building linux kernel with -j512 inside guest) when IO throttling is enabled. With the f

[Qemu-devel] [PATCH 1/1] scripts/qemugdb/coroutine.py: get pthread pointer from '(gdb) thread info $id' output

2017-03-14 Thread Roman Pen
to modify registers (that is only possible for live process, not for a corefile). This problem is solved in the next patch for a gdb project itself. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: qemu-devel@nongnu.org --- scripts/qemugdb/coroutine.py | 29 ++--- 1 fi

[Qemu-devel] [PATCH v2 1/3] linux-aio: consume events in userspace instead of calling io_getevents

2016-07-19 Thread Roman Pen
-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 125 ++ 1 file changed, 99 insertions(+), 26 deletions(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index 78f4524..3e29f1d 100644

[Qemu-devel] [PATCH v2 3/3] linux-aio: process completions from ioq_submit()

2016-07-19 Thread Roman Pen
90160, per=12.49%, avg=245746.04, stdev=11606.75 Throughput increased from 1822MB/s to 1921MB/s, average completion latencies decreased from 1051us to 988us. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 24 ++

[Qemu-devel] [PATCH v2 2/3] linux-aio: split processing events function

2016-07-19 Thread Roman Pen
Prepare processing events function to be called from ioq_submit(), thus split function on two parts: the first harvests completed IO requests, the second submits pending requests. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c

[Qemu-devel] [PATCH v2 0/3] linux-aio: reduce completion latency

2016-07-19 Thread Roman Pen
latencies decreased from 1051us to 988us. Roman Pen (3): linux-aio: consume events in userspace instead of calling io_getevents linux-aio: split processing events function linux-aio: process completions from ioq_submit() block/linux-aio.c | 178 ++-

[Qemu-devel] [PATCH 3/3] linux-aio: process completions from ioq_submit()

2016-07-19 Thread Roman Pen
90160, per=12.49%, avg=245746.04, stdev=11606.75 Throughput increased from 1822MB/s to 1921MB/s, average completion latencies decreased from 1051us to 988us. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 17 +++-- 1 fi

[Qemu-devel] [PATCH 2/3] linux-aio: split processing events function

2016-07-19 Thread Roman Pen
Prepare processing events function to be called from ioq_submit(), thus split function on two parts: the first harvests completed IO requests, the second submits pending requests. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c

[Qemu-devel] [PATCH 1/3] linux-aio: consume events in userspace instead of calling io_getevents

2016-07-19 Thread Roman Pen
-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 125 ++ 1 file changed, 99 insertions(+), 26 deletions(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index 78f4524..3e29f1d 100644

[Qemu-devel] [PATCH 0/3] linux-aio: reduce completion latency

2016-07-19 Thread Roman Pen
04, stdev=11606.75 Throughput increased from 1822MB/s to 1921MB/s, average completion latencies decreased from 1051us to 988us. Roman Pen (3): linux-aio: consume events in userspace instead of calling io_getevents linux-aio: split processing events function linux-aio: process comple

[Qemu-devel] [PATCH v3 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Pen
or reiteration of io_getevents() call this patch restricts the number of in-flights, which is now limited to MAX_EVENTS. Signed-off-by: Roman Pen Reviewed-by: Fam Zheng Reviewed-by: Paolo Bonzini Cc: Stefan Hajnoczi Cc: qemu-devel@nongnu.org --- v3: o comment tweaks. v2: o comment tweaks. o

[Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Pen
ore or hang will happen. */ To prevent the hang or reiteration of io_getevents() call this patch restricts the number of in-flights, which is now limited to MAX_EVENTS. Signed-off-by: Roman Pen Reviewed-by: Fam Zheng Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/li

[Qemu-devel] [PATCH 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-12 Thread Roman Pen
or reiteration of io_getevents() call this patch restricts the number of in-flights, which is limited to MAX_EVENTS. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 25 +++-- 1 file changed, 15 insertions(+),

[Qemu-devel] [RFC 1/1] linux-aio: consume events in userspace instead of calling io_getevents

2016-07-12 Thread Roman Pen
. Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 86 --- 1 file changed, 70 insertions(+), 16 deletions(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index fe7cece

[Qemu-devel] [RFC v2] virtio-blk: simple multithreaded MQ implementation for bdrv_raw

2016-06-24 Thread Roman Pen
part in reasonable time. Of course, my qemu block layer experience is rather shallow and I do not see obvious ways how to make this IO path thread-safe without changing everything all over the place. -- Roman Signed-off-by: Roman Pen Cc: Stefan Hajnoczi Cc: qemu-devel@nongnu.o

[Qemu-devel] [PATCH 1/1] Revert "linux-aio: Cancel BH if not needed"

2016-06-24 Thread Roman Pen
untime=30 [job] filename=/dev/vda VM configuration: - -object iothread,id=t0 \ -drive if=none,id=d0,file=/dev/nullb0,format=raw,snapshot=off,cache=none,aio=native \ -device virtio-blk-pci,drive=d0,iothread=t0,num-queues=4,disable-modern=off,disable-legacy=on \ Signed-off-by: Roman

[Qemu-devel] [RFC] virtio-blk: simple multithreaded MQ implementation for bdrv_raw

2016-05-27 Thread Roman Pen
ockBackend device in order to access one BlockBackend from many iothreads, but I failed to finish this part in reasonable time. Of course, my qemu block layer experience is rather shallow and I do not see obvious ways how to make this IO path thread-safe without changing everything all over the place.