Replay uses number of executed instructions to determine corrent events
injection moments. This patch introduces new function for querying the
instructions counter.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c | 13 ++---
include/qemu/timer.h |1 +
2 files changed, 11
This patch adds icount event to the replay subsystem. This event corresponds
to execution of several instructions and used to synchronize input events
in the replay phase.
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.c | 14 ++
replay/replay-internal.h | 18
This patch adds global variables, defines, functions declarations,
and function stubs for deterministic VM replay used by external modules.
Signed-off-by: Pavel Dovgalyuk
---
Makefile.target |1 +
qapi-schema.json | 32
replay/Makefile.objs |1
This patch is required for deterministic replay to generate an exception
by trying executing an instruction without changing icount.
It adds new flag to TB for disabling icount while translating it.
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c |6
From: Paolo Bonzini
Subject: [PATCH] cpu-exec: add a new CF_USE_ICOUNT cflag
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
include/exec/exec-all.h |5 +++--
translate-all.c |3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/exec
Exception index is reset at every entry at every entry into cpu_exec()
function. This may cause missing the exceptions while replaying them.
This patch moves exception_index reset to the locations where they are
processed.
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c |3 ++-
cpus.c
e.
Signed-off-by: Pavel Dovgalyuk
---
target-i386/cpu.h |3 +++
target-i386/translate.c | 14 ++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 015f5b5..ca94f8f 100644
--- a/target-i386/cpu.h
+++ b/target-
In this case, QEMU might longjmp out of cpu-exec.c and miss the final
cleanup in cpu_exec_nocache. Do this manually through a new compile
flag. This is important once we add no-icount translations.
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c
This patch adds calls to replay functions into the icount setup block.
In record mode number of executed instructions is written to the log.
In replay mode number of istructions to execute is taken from the replay log.
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c |1 +
cpus.c
From: Paolo Bonzini
Subject: [PATCH] translate: check cflags instead of use_icount global
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
target-alpha/translate.c|8 ---
target-arm/translate-a64.c |4 ++--
target-arm/translate.c |4 ++--
target-i386
, or checkpoint in the iothread.
Signed-off-by: Pavel Dovgalyuk
---
replay/Makefile.objs |1
replay/replay-events.c | 217 ++
replay/replay-internal.h | 27 ++
replay/replay.h |4 +
4 files changed, 249 insertions(+), 0
simulator-specific
actions. That is why we added new clock which is recorded and
replayed when needed.
Signed-off-by: Pavel Dovgalyuk
---
include/qemu/timer.h |7 +++
qemu-timer.c |2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/qemu/timer.h b/include
This patch includes modifications of common cpu files. All interrupts and
exceptions occured during recording are written into the replay log.
These events allow correct replaying the execution by kicking cpu thread
when one of these events is found in the log.
Signed-off-by: Pavel Dovgalyuk
From: Paolo Bonzini
Subject: [PATCH] gen-icount: check cflags instead of use_icount global
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
include/exec/gen-icount.h |6 +++---
target-alpha/translate.c |2 +-
target-arm/translate-a64.c|2 +-
target
This patch adds saving and replaying warping parameters in record and replay
modes. These parameters affect on virtual clock values and therefore should
be deterministic.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c | 18 +-
1 files changed, 9 insertions(+), 9 deletions(-)
diff
This patch replaces calling of get_clock_realtime() everywhere
except the timer module. All calls are replaced with host clock requests.
Patch also replaces get_clock() calls with realtime clock requests.
Usage of this interface simplifies implementation of record/replay.
Signed-off-by: Pavel
the module, which wants to read the values.
Such a design required the clock polling to be synchronized. Sometimes
it is not true - e.g. when timeouts for timer lists are checked. In this case
we use a cached value of the clock, passing it to the client code.
Signed-off-by: Pavel Dovgalyuk
lead to non-determinism.
Signed-off-by: Pavel Dovgalyuk
---
hw/timer/mc146818rtc.c | 10
hw/timer/pl031.c | 10
include/qemu-common.h|1
replay/replay-internal.h |4 ++
replay/replay-time.c | 112 ++
replay
This patch records and replays simulator shutdown event.
Signed-off-by: Pavel Dovgalyuk
---
include/sysemu/sysemu.h |1 +
replay/replay-internal.h |2 ++
replay/replay.c | 11 +++
replay/replay.h |5 +
vl.c |8 +++-
5
This patch introduces checkpoints that synchronize cpu thread and iothread.
When checkpoint is met in the code all asynchronous events from the queue
are executed.
Signed-off-by: Pavel Dovgalyuk
---
block.c | 11 +++
cpus.c |7 ++-
include
usly saved log.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |3 +-
qemu-options.hx | 27 +++
vl.c| 79 ++-
3 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/cpus.c b/cpus.c
index 2f038e
This patch introduces bottom half event for replay queue. It saves the events
into the queue and process them at the checkpoints and instructions execution.
Signed-off-by: Pavel Dovgalyuk
---
async.c | 46 --
dma-helpers.c
This patch adds identifier to aio requests. ID is used for creating bottom
halves and identifying them while replaying.
The patch also introduces several functions that make possible replaying
of the aio requests.
Signed-off-by: Pavel Dovgalyuk
---
block.c| 81
This patch modifies thread pool to allow replaying asynchronous thread tasks
synchronously in replay mode.
Signed-off-by: Pavel Dovgalyuk
---
block/raw-posix.c |6 -
block/raw-win32.c |4 +++-
include/block/thread-pool.h |4 +++-
replay/replay-events.c
This patch introduces the functions for enabling the record/replay and for
freeing the resources when simulator closes.
Signed-off-by: Pavel Dovgalyuk
---
block.c |2 -
exec.c |1
replay/replay-internal.h |2 +
replay/replay.c | 134
This records user input (keyboard and mouse events) in record mode and replays
these input events in replay mode.
Signed-off-by: Pavel Dovgalyuk
---
include/ui/input.h |2 +
replay/Makefile.objs |1
replay/replay-events.c | 48
replay/replay-input.c
No, it worked well and I deleted _nocache version of that function.
But I still need _raw one to get the instructions counter.
Sent using CloudMagic
On вт, Дек 09, 2014 at 8:39 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
On 08/12/2014 08:53, Pavel Dovgalyuk wrote:
>
Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions
break the determinism of cpu_exec. This patch is required to make
interrupts processing deterministic.
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c|6 ++
target-i386/cpu.c | 10
ested by Kirill
Batuzov)
* Added QMP versions of replay commands (as suggested by Eric Blake)
* Removed some optional features of replay to make patches cleaner
* Minor changes and code cleanup were made
---
Pavel Dovgalyuk (23):
i386: partial revert of interrupt poll fix
replay: global
This patch adds functions to perform read and write operations
with replay log.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/Makefile.objs |1
replay/replay-internal.c | 149 ++
replay/replay-internal.h | 46
This patch adds icount event to the replay subsystem. This event corresponds
to execution of several instructions and used to synchronize input events
in the replay phase.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.c | 24
This patch adds global variables, defines, function declarations,
and function stubs for deterministic VM replay used by external modules.
Reviewed-by: Paolo Bonzini
Reviewed-by: Eric Blake
Signed-off-by: Pavel Dovgalyuk
---
Makefile.target |1
docs/replay.txt | 167
This mutex will protect read/write operations for replay log.
Using mutex is necessary because most of the events consist of
several fields stored in the log. The mutex will help to avoid races.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.c | 27
This patch records and replays simulator shutdown event.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.h |2 ++
replay/replay.c | 14 ++
replay/replay.h |5 +
vl.c |1 +
4 files changed
This patch is required for deterministic replay to generate an exception
by trying executing an instruction without changing icount.
It adds new flag to TB for disabling icount while translating it.
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c |7
This patch updates x86_cpu_exec_interrupt function.
It can process two interrupt request at a time (poll and another one).
This makes its execution non-deterministic. Determinism is requred
for recorded icount execution.
Signed-off-by: Pavel Dovgalyuk
---
target-i386/seg_helper.c |3 +++
1
This patch introduces checkpoints that synchronize cpu thread and iothread.
When checkpoint is met in the code all asynchronous events from the queue
are executed.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |5 +
main-loop.c |6 ++
qemu-timer.c
This patch removes "static" specifier from several qemu function to make
them visible to the replay module. It also invents several system functions
that will be used by replay.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |2 +-
include
This patch includes modifications of common cpu files. All interrupts and
exceptions occured during recording are written into the replay log.
These events allow correct replaying the execution by kicking cpu thread
when one of these events is found in the log.
Signed-off-by: Pavel Dovgalyuk
called to wake up the iothread.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpus.c | 38 +-
replay/replay.c | 33 -
replay/replay.h |4
3 files changed, 61 insertions(+), 14 deletions
, or checkpoint in the iothread.
Signed-off-by: Pavel Dovgalyuk
---
replay/Makefile.objs |1
replay/replay-events.c | 227 ++
replay/replay-internal.h | 31 ++
replay/replay.h |6 +
4 files changed, 265 insertions(+), 0
This patch introduces the functions for enabling the record/replay and for
freeing the resources when simulator closes.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
exec.c |1
replay/replay-internal.h |2 +
replay/replay.c | 134
the values.
Such a design required the clock polling to be synchronized. Sometimes
it is not true - e.g. when timeouts for timer lists are checked. In this case
we use a cached value of the clock, passing it to the client code.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |3
Bottom halves in AIO context are stored and removes
in LIFO order. It makes their execution non-deterministic.
This patch replaces the stack with queue to preserve the
order of bottom halves processing.
Signed-off-by: Pavel Dovgalyuk
---
async.c | 26
This patch adds identifier to aio requests. ID is used for creating bottom
halves and identifying them while replaying.
The patch also introduces several functions that make possible replaying
of the aio requests.
Signed-off-by: Pavel Dovgalyuk
---
block.c| 82
log.
Signed-off-by: Pavel Dovgalyuk
---
qemu-options.hx |8 ++--
replay/replay.c |4
vl.c| 15 +--
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 319d971..a6f42c4 100644
--- a/qemu-options.hx
+
This patch modifies thread pool to allow replaying asynchronous thread tasks
synchronously in replay mode.
Signed-off-by: Pavel Dovgalyuk
---
block/raw-posix.c |6 -
block/raw-win32.c |4 +++-
include/block/thread-pool.h |4 +++-
replay/replay-events.c
This patch introduces bottom half event for replay queue. It saves the events
into the queue and process them at the checkpoints and instructions execution.
Signed-off-by: Pavel Dovgalyuk
---
async.c | 24 +++-
dma-helpers.c|4 +++-
hw/ide
This records user input (keyboard and mouse events) in record mode and replays
these input events in replay mode.
Signed-off-by: Pavel Dovgalyuk
---
include/ui/input.h |2 +
replay/Makefile.objs |1
replay/replay-events.c | 31 +
replay/replay-input.c| 159
This patch moves typedefs for QemuOpts and related types
to qemu/typedefs.h file.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
include/qemu/option.h |5 +
include/qemu/typedefs.h |3 +++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/qemu
Some devices are not supported by record/replay subsystem.
This patch introduces replay blocker which denies starting record/replay
if such devices are included into the configuration.
Signed-off-by: Pavel Dovgalyuk
---
hw/bt/hci.c |7 +++
include/qapi/qmp/qerror.h |3
Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions
break the determinism of cpu_exec. This patch is required to make
interrupts processing deterministic.
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c|6 ++
target-i386/cpu.c | 10
zini)
v2 changes:
* Patches are split to be reviewable and bisectable (as suggested by Kirill
Batuzov)
* Added QMP versions of replay commands (as suggested by Eric Blake)
* Removed some optional features of replay to make patches cleaner
* Minor changes and code cleanup were made
---
Pavel
This patch adds icount event to the replay subsystem. This event corresponds
to execution of several instructions and used to synchronize input events
in the replay phase.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.c | 24
called to wake up the iothread.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpus.c | 38 +-
replay/replay.c | 33 -
replay/replay.h |4
3 files changed, 61 insertions(+), 14 deletions
This mutex will protect read/write operations for replay log.
Using mutex is necessary because most of the events consist of
several fields stored in the log. The mutex will help to avoid races.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.c | 27
This patch adds global variables, defines, function declarations,
and function stubs for deterministic VM replay used by external modules.
Reviewed-by: Paolo Bonzini
Reviewed-by: Eric Blake
Signed-off-by: Pavel Dovgalyuk
---
Makefile.target |1
docs/replay.txt | 167
This patch includes modifications of common cpu files. All interrupts and
exceptions occured during recording are written into the replay log.
These events allow correct replaying the execution by kicking cpu thread
when one of these events is found in the log.
Signed-off-by: Pavel Dovgalyuk
the values.
Such a design required the clock polling to be synchronized. Sometimes
it is not true - e.g. when timeouts for timer lists are checked. In this case
we use a cached value of the clock, passing it to the client code.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |3
This patch removes "static" specifier from several qemu function to make
them visible to the replay module. It also invents several system functions
that will be used by replay.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |2 +-
include
This patch is required for deterministic replay to generate an exception
by trying executing an instruction without changing icount.
It adds new flag to TB for disabling icount while translating it.
Signed-off-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
cpu-exec.c |7
This patch introduces checkpoints that synchronize cpu thread and iothread.
When checkpoint is met in the code all asynchronous events from the queue
are executed.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |5 +
main-loop.c |6 ++
qemu-timer.c
This patch records and replays simulator shutdown event.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/replay-internal.h |2 ++
replay/replay.c | 14 ++
replay/replay.h |5 +
vl.c |1 +
4 files changed
This patch updates x86_cpu_exec_interrupt function.
It can process two interrupt request at a time (poll and another one).
This makes its execution non-deterministic. Determinism is requred
for recorded icount execution.
Signed-off-by: Pavel Dovgalyuk
---
target-i386/seg_helper.c |3 +++
1
This patch adds functions to perform read and write operations
with replay log.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
replay/Makefile.objs |1
replay/replay-internal.c | 149 ++
replay/replay-internal.h | 46
This patch adds deterministic replay for hardware periodic countdown timers.
Signed-off-by: Pavel Dovgalyuk
---
hw/core/ptimer.c |7 ++-
replay/replay-events.c | 17 +
replay/replay-internal.h |1 +
replay/replay.h |2 ++
4 files changed, 26
, or checkpoint in the iothread.
Signed-off-by: Pavel Dovgalyuk
---
replay/Makefile.objs |1
replay/replay-events.c | 227 ++
replay/replay-internal.h | 31 ++
replay/replay.h |6 +
4 files changed, 265 insertions(+), 0
This patch moves typedefs for QemuOpts and related types
to qemu/typedefs.h file.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
include/qemu/option.h |5 +
include/qemu/typedefs.h |3 +++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/qemu
This patch introduces aio_bh_call function. It is used to execute
bottom halves as callbacks without adding them to the queue.
Signed-off-by: Pavel Dovgalyuk
---
async.c |7 ++-
include/block/aio.h |5 +
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a
Some devices are not supported by record/replay subsystem.
This patch introduces replay blocker which denies starting record/replay
if such devices are included into the configuration.
Signed-off-by: Pavel Dovgalyuk
---
hw/bt/hci.c |7 +++
include/qapi/qmp/qerror.h |3
and callback is executed. Binding callback moment to one of the checkpoints
makes it deterministic.
Signed-off-by: Pavel Dovgalyuk
---
include/ui/input.h |2 +
replay/Makefile.objs |1
replay/replay-events.c | 31 +
replay/replay-input.c| 159
This patch introduces the functions for enabling the record/replay and for
freeing the resources when simulator closes.
Reviewed-by: Paolo Bonzini
Signed-off-by: Pavel Dovgalyuk
---
exec.c |1
replay/replay-internal.h |2 +
replay/replay.c | 134
log.
Signed-off-by: Pavel Dovgalyuk
---
qemu-options.hx |8 ++--
replay/replay.c |4
vl.c| 15 +--
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index ec356f6..fcb5ddc 100644
--- a/qemu-options.hx
+
ther character devices nor network are supported
> yet).
>
> Pavel, can you prepare a page on the wiki?
Yes, how can I make it?
Pavel Dovgalyuk
and serial communication ports
(e.g., telnet terminal).
---
Pavel Dovgalyuk (3):
replay: character devices
replay: introduce new checkpoint for icount warp
replay: introduce block devices record/replay
block/block-backend.c | 71 +++---
cpus.c
allow controlling
the replaying through gdb.
Signed-off-by: Pavel Dovgalyuk
---
gdbstub.c|2 -
include/sysemu/char.h| 26
include/sysemu/replay.h | 12 ++
qemu-char.c | 56 ---
replay/Makefile.objs |1
voked record/replay checkpoints.
Queue is flushed at checkpoints and information about processed requests
is recorded to the log. In replay phase the queue is matched with
events read from the log. Therefore block devices requests are processed
deterministically.
Signed-off-by: Pavel Dovgalyuk
---
) may be called from different
thread. This patch introduces new checkpoint which distinguished warp
checkpoint calls from different threads.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |9 +
include/qemu/timer.h|3 ++-
include/sysemu/replay.h |1 +
main-loop.c
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 09.02.2016 um 06:55 hat Pavel Dovgalyuk geschrieben:
> > This patch introduces a set of functions that implement recording
> > and replaying of block devices' operations. These functions form a thin
> > layer between
for qemu internal operations (e.g., migration).
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 (4):
replay: character devices
qemu_clock_warp call in qemu_tcg_wait_io_event function is not needed
anymore, because it is called in every iteration of main_loop_wait.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/cpus.c b/cpus.c
index 898426c..01c9809
allow controlling
the replaying through gdb.
Signed-off-by: Pavel Dovgalyuk
---
gdbstub.c|2 -
include/sysemu/char.h| 26
include/sysemu/replay.h | 12 ++
qemu-char.c | 56 ---
replay/Makefile.objs |1
) may be called from different
thread. This patch introduces new checkpoint which distinguished warp
checkpoint calls from different threads.
Signed-off-by: Pavel Dovgalyuk
---
cpus.c |7 ---
include/qemu/timer.h|3 ++-
include/sysemu/replay.h |1 +
main-loop.c
voked record/replay checkpoints.
Queue is flushed at checkpoints and information about processed requests
is recorded to the log. In replay phase the queue is matched with
events read from the log. Therefore block devices requests are processed
deterministically.
Signed-off-by: Pavel Dovgalyuk
---
> -Original Message-
> Am 09.02.2016 um 12:52 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > But even this doesn't feel completely right, because block drivers are
> > > already layered and there is no ne
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 10.02.2016 um 13:05 hat Pavel Dovgalyuk geschrieben:
> > > Am 09.02.2016 um 12:52 hat Pavel Dovgalyuk geschrieben:
> > > > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > > > But even this doesn'
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 10.02.2016 um 13:51 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > Am 10.02.2016 um 13:05 hat Pavel Dovgalyuk geschrieben:
> > > > > Am 09.02.2016 um 12:52 hat Pavel Do
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 10.02.2016 um 13:51 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > Am 10.02.2016 um 13:05 hat Pavel Dovgalyuk geschrieben:
> > > > > Am 09.02.2016 um 12:52 hat Pavel Do
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 11.02.2016 um 07:05 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > Am 10.02.2016 um 13:51 hat Pavel Dovgalyuk geschrieben:
> > > > However, I don't under
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 11.02.2016 um 12:00 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > Am 11.02.2016 um 07:05 hat Pavel Dovgalyuk geschrieben:
> > > > > From: Kevin Wolf [mailto:kw...@re
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com]
> On Wed, Feb 10, 2016 at 12:13:23PM +0300, Pavel Dovgalyuk wrote:
> > @@ -784,7 +798,11 @@ BlockAIOCB *blk_aio_flush(BlockBackend *blk,
> > return blk_abort_aio_request(blk, cb, opaque, -ENOMEDIUM);
> >
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 11.02.2016 um 12:00 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > Am 11.02.2016 um 07:05 hat Pavel Dovgalyuk geschrieben:
> > > > > From: Kevin Wolf [mailto:kw...@re
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 10.02.2016 um 13:51 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > Am 10.02.2016 um 13:05 hat Pavel Dovgalyuk geschrieben:
> > > > > Am 09.02.2016 um 12:52 hat Pavel Do
, in order for this to work, we actually need to take the mutex
> before calling blkreplay_run_event(), which is called directly from the
> replay code (which runs in the mainloop thread? Or vcpu?).
blkreplay_run_event() is called from replay code which is protected by mutex.
This function may be called from io and vcpu threads, because both of them
have replay functions invocations.
> So I think you need to have a aio_context_acquire(bs->aio_context) and
> aio_context_release(bs->aio_context) around the function; either here or
> in the calling replay code.
And what about coroutine code? Does it call aio_context_acquire somewhere?
Pavel Dovgalyuk
> From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru]
> > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > >
> > > > int blkreplay_co_readv()
> > > > {
> > > > BlockReplayState *s = bs->opaque;
> > > >
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 15.02.2016 um 10:14 hat Pavel Dovgalyuk geschrieben:
> > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru]
> > > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > >
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 15.02.2016 um 10:14 hat Pavel Dovgalyuk geschrieben:
> > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru]
> > > > From: Kevin Wolf [mailto:kw...@redhat.com]
> > > >
added to the queue.
> And I still don't understand why aio_poll() doesn't work and where it
> hangs.
aio_poll hangs if "req = block_request_insert(reqid, bs,
qemu_coroutine_self());" line
is executed after bdrv_co_readv. When bdrv_co_readv yields,
replay_run_block_event has no
information about pending request and cannot jump to its coroutine.
Maybe I should implement aio_poll execution there to make progress in that case?
> > qemu_coroutine_enter(req->co, NULL);
> > }
> > }
Pavel Dovgalyuk
he coroutine and in the main "coroutine" that executes
> > > aio_poll()?
I've tried to replace usleep with aio_poll.
In this case replay cannot be made, because of recursive mutex lock:
aio_poll -> qemu_clock_get_ns -> ->
replay_run_block_event -> aio_poll -> qemu_clock_get_ns -> ->
Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com]
> Am 15.02.2016 um 15:24 hat Pavel Dovgalyuk geschrieben:
> > > From: Kevin Wolf [mailto:kw...@redhat.com]
> >
> > > > There could be asynchronous events that occur in non-cpu threads.
> > > > For now the
301 - 400 of 2335 matches
Mail list logo