Re: [Qemu-devel] [PATCH v5 0/7] Deterministic replay extensions
Thank you! Sent using CloudMagic Email [https://cloudmagic.com/k/d/mailapp?ct=ta&cv=7.3.5&pv=5.1.1&source=email_footer_2] On чт, Мар 24, 2016 at 2:59 PM, Kevin Wolf < kw...@redhat.com [kw...@redhat.com] > wrote: Am 14.03.2016 um 08:44 hat Pavel Dovgalyuk geschrieben: > This set of patches is related to the reverse execution and deterministic > replay of qemu execution. It includes recording and replaying of serial > devices > and block devices operations. > > With these patches one can record and deterministically replay behavior > of the system with connected disk drives and serial communication ports > (e.g., telnet terminal). > > Patches for deterministic replay of the block devices intercept calls of > bdrv coroutine functions at the top of block drivers stack. > To record and replay block operations the drive must be configured > as following: > -drive file=disk.qcow,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay > -device ide-hd,drive=img-blkreplay > > blkreplay driver should be inserted between disk image and virtual driver > controller. Therefore all disk requests may be recorded and replayed. As Paolo already merged and modified the first three patches, and I don't feel like having another version and there seems to be no better maintainer, I fixed and rebased onto the modified part the remaining four patches and put them into my block tree. Kevin
Re: [Qemu-devel] [PATCH v5 0/7] Deterministic replay extensions
Am 14.03.2016 um 08:44 hat Pavel Dovgalyuk geschrieben: > This set of patches is related to the reverse execution and deterministic > replay of qemu execution. It includes recording and replaying of serial > devices > and block devices operations. > > With these patches one can record and deterministically replay behavior > of the system with connected disk drives and serial communication ports > (e.g., telnet terminal). > > Patches for deterministic replay of the block devices intercept calls of > bdrv coroutine functions at the top of block drivers stack. > To record and replay block operations the drive must be configured > as following: > -drive file=disk.qcow,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay > -device ide-hd,drive=img-blkreplay > > blkreplay driver should be inserted between disk image and virtual driver > controller. Therefore all disk requests may be recorded and replayed. As Paolo already merged and modified the first three patches, and I don't feel like having another version and there seems to be no better maintainer, I fixed and rebased onto the modified part the remaining four patches and put them into my block tree. Kevin
Re: [Qemu-devel] [PATCH v5 0/7] Deterministic replay extensions
> From: igor.rubi...@gmail.com [mailto:igor.rubi...@gmail.com] On Behalf Of > Igor R > > This set of patches is related to the reverse execution and deterministic > > replay of qemu execution. It includes recording and replaying of serial > > devices > > and block devices operations. > > Thanks for the great feature. > > A couple of questions: > * Is it possible to enable/disable recording when QEMU is already > running? I.e. is it ok to call replay_configure() or replay_enable() > from the monitor? Would it be possible to replay such a log? Our internal code base does not include this feature. But we plan to implement this after submitting all already existing patches. > * Currently, when running QEMU with the above drive configuration > (even w/o icount), savevm command doesn't seem to work correctly, and > subsequent loavm crashes QEMU. Is it just a bug or this feature > doesn't support snapshots? Supporting snapshots includes much more work in addition to correct interaction with replay. Therefore this feature is not supported yet, but we will add it later. > * The replaying is much slower than the original scenario. Is it > affected by icount shift? What shift values would allow "real time" > speed? icount shows how many guest instructions correspond to one guest clock tick. "Real speed" may differ from machine to machine. However, replaying speed was not the subject of our investigations yet. Recording speed is more important, because it may affect the behavior of the system. Pavel Dovgalyuk
Re: [Qemu-devel] [PATCH v5 0/7] Deterministic replay extensions
> This set of patches is related to the reverse execution and deterministic > replay of qemu execution. It includes recording and replaying of serial > devices > and block devices operations. > > With these patches one can record and deterministically replay behavior > of the system with connected disk drives and serial communication ports > (e.g., telnet terminal). > > Patches for deterministic replay of the block devices intercept calls of > bdrv coroutine functions at the top of block drivers stack. > To record and replay block operations the drive must be configured > as following: > -drive file=disk.qcow,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay > -device ide-hd,drive=img-blkreplay Thanks for the great feature. A couple of questions: * Is it possible to enable/disable recording when QEMU is already running? I.e. is it ok to call replay_configure() or replay_enable() from the monitor? Would it be possible to replay such a log? * Currently, when running QEMU with the above drive configuration (even w/o icount), savevm command doesn't seem to work correctly, and subsequent loavm crashes QEMU. Is it just a bug or this feature doesn't support snapshots? * The replaying is much slower than the original scenario. Is it affected by icount shift? What shift values would allow "real time" speed? Thanks!
[Qemu-devel] [PATCH v5 0/7] Deterministic replay extensions
This set of patches is related to the reverse execution and deterministic replay of qemu execution. It includes recording and replaying of serial devices and block devices operations. With these patches one can record and deterministically replay behavior of the system with connected disk drives and serial communication ports (e.g., telnet terminal). Patches for deterministic replay of the block devices intercept calls of bdrv coroutine functions at the top of block drivers stack. To record and replay block operations the drive must be configured as following: -drive file=disk.qcow,if=none,id=img-direct -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay -device ide-hd,drive=img-blkreplay blkreplay driver should be inserted between disk image and virtual driver controller. Therefore all disk requests may be recorded and replayed. v5 changes: - updated record/replay documentation (as suggested by Paolo Bonzini) - added record/replay support for qemu_chr_fe_write_all and qemu_chr_fe_read_all functions - added protection from chardevs unplugging in record/replay mode (as suggested by Paolo Bonzini) - minor chardevs record/replay changes (as suggested by Paolo Bonzini) - BH replay bugfix was moved to separate patch (as suggested by Stefan Hajnoczi) - fixed error message in replay events queue module v4 changes: - minor fixes in blkreplay layer (as suggested by Kevin Wolf) - split qemu_clock_warp into two functions (as suggested by Paolo Bonzini) v3 changes: - introduced bdrv_flush callback for block drivers - introduced block driver for recording block operations (as suggested by Kevin Wolf) - added documentation for block record/replay v2 changes: - removed obsolete call of qemu_clock_warp - fixed record/replay of aio_cancel - simplified call sequence for blk_aio_ functions in non-replay mode (as suggested by Kevin Wolf) --- Pavel Dovgalyuk (7): replay: character devices icount: remove obsolete warp call icount: decouple warp calls block: add flush callback replay: bh scheduling fix replay: fix error message replay: introduce block devices record/replay block/Makefile.objs |2 - block/blkreplay.c | 159 +++ block/io.c|7 ++ cpus.c| 56 --- docs/replay.txt | 37 +- gdbstub.c |2 - include/block/block_int.h |7 ++ include/qemu/timer.h | 14 +++- include/sysemu/char.h | 26 +++ include/sysemu/replay.h | 22 ++ main-loop.c |2 - qemu-char.c | 138 ++--- qemu-timer.c |4 + replay/Makefile.objs |1 replay/replay-char.c | 167 + replay/replay-events.c| 41 ++- replay/replay-internal.h | 19 + replay/replay.c |2 - stubs/clock-warp.c|2 - stubs/replay.c|4 + 20 files changed, 641 insertions(+), 71 deletions(-) create mode 100755 block/blkreplay.c create mode 100755 replay/replay-char.c -- Pavel Dovgalyuk