Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-28 Thread Kevin Wolf
Am 29.02.2016 um 08:03 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 25.02.2016 um 10:06 hat Pavel Dovgalyuk geschrieben: > > > There is one problem with flush event - callbacks for flush are called for > > > all layers and I couldn't synchronize them

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-28 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 25.02.2016 um 10:06 hat Pavel Dovgalyuk geschrieben: > > There is one problem with flush event - callbacks for flush are called for > > all layers and I couldn't synchronize them correctly yet. > > I'll probably have to add new callback to block

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-26 Thread Kevin Wolf
Am 25.02.2016 um 10:06 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > Coroutines aren't randomly assigned to threads, but threads actively > > > > enter coroutines. To my knowledge this happens only when starting a > > > > request (either vcpu or I/O

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-25 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > > > Coroutines aren't randomly assigned to threads, but threads actively > > > enter coroutines. To my knowledge this happens only when starting a > > > request (either vcpu or I/O thread; consistent per device) or by a > > > callback when some event

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-24 Thread Kevin Wolf
Am 24.02.2016 um 12:59 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 20.02.2016 um 08:11 hat Pavel Dovgalyuk geschrieben: > > > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > Am 16.02.2016

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-24 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 20.02.2016 um 08:11 hat Pavel Dovgalyuk geschrieben: > > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > > > > Coroutine

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-22 Thread Kevin Wolf
Am 20.02.2016 um 08:11 hat Pavel Dovgalyuk geschrieben: > > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > > > Coroutine

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-19 Thread Pavel Dovgalyuk
> From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > > Coroutine Replay > > > bool *done = req_replayed_list_get(reqid) // NULL > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-18 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > Coroutine Replay > > bool *done = req_replayed_list_get(reqid) // NULL > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-16 Thread Kevin Wolf
Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 16.02.2016 um 07:25 hat Pavel Dovgalyuk geschrieben: > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > Am 15.02.2016 um 15:24 hat Pavel Dovgalyuk geschrieben: > > > > > > From:

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-16 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 16.02.2016 um 07:25 hat Pavel Dovgalyuk geschrieben: > > > 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] > > > > > > Here is the current

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-16 Thread Kevin Wolf
Am 16.02.2016 um 07:25 hat Pavel Dovgalyuk geschrieben: > > 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. >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread 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 these events are shutdown request and block task

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Kevin Wolf
Am 15.02.2016 um 15:24 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > > > First of all, I'm not sure if running replay events from > > > > qemu_clock_get_ns() is such a great idea. This is not a function that > > > > callers expect to change any state.

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > > void replay_run_block_event(uint32_t id) > > { > > Request *req; > > if (replay_mode == REPLAY_MODE_PLAY) { > > while (!(req = block_request_find(id))) { > > //aio_poll(bdrv_get_aio_context(req->bs), true); > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > First of all, I'm not sure if running replay events from > > > qemu_clock_get_ns() is such a great idea. This is not a function that > > > callers expect to change any state. If you absolutely have to do it > > > there instead of in the

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Kevin Wolf
Am 15.02.2016 um 14:54 hat Pavel Dovgalyuk geschrieben: > > 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] > > > > > > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> 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] > > > > > > > > > > > > int blkreplay_co_readv() > > > > > > { > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Kevin Wolf
Am 15.02.2016 um 12:19 hat Pavel Dovgalyuk geschrieben: > > 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] > > > > > > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> 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] > > > > > > > > > > > > int blkreplay_co_readv() > > > > > > { > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Kevin Wolf
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] > > > > > > > > > > int blkreplay_co_readv() > > > > > { > > > > > BlockReplayState *s = bs->opaque; > > > > > int reqid =

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > > > int blkreplay_co_readv() > > > > { > > > > BlockReplayState *s = bs->opaque; > > > > int reqid = s->reqid++; > > > > > > > > bdrv_co_readv(bs->file, ...); > > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Kevin Wolf
Am 15.02.2016 um 09:38 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > > > int blkreplay_co_readv() > > > > { > > > > BlockReplayState *s = bs->opaque; > > > > int reqid = s->reqid++; > > > > > > > > bdrv_co_readv(bs->file, ...); > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > int blkreplay_co_readv() > > > { > > > BlockReplayState *s = bs->opaque; > > > int reqid = s->reqid++; > > > > > > bdrv_co_readv(bs->file, ...); > > > > > > if (mode == record) { > > > log(reqid, time); > > > }

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-12 Thread Pavel Dovgalyuk
> 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...@redhat.com] > > > > > Am 10.02.2016 um

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-12 Thread Kevin Wolf
Am 12.02.2016 um 09:33 hat Pavel Dovgalyuk geschrieben: > > 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:

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-12 Thread Pavel Dovgalyuk
> 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 Dovgalyuk geschrieben: > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-12 Thread Kevin Wolf
Am 12.02.2016 um 14:19 hat Pavel Dovgalyuk geschrieben: > > 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

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-11 Thread Kevin Wolf
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 understand yet which layer do you offer as the candidate > > > for record/replay? What functions should be

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-11 Thread Pavel Dovgalyuk
> 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...@redhat.com] > > > > > Am 10.02.2016 um

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-11 Thread Pavel Dovgalyuk
> 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 understand yet which layer do you offer as the > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-11 Thread Kevin Wolf
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...@redhat.com] > > > > Am 10.02.2016 um 13:51 hat Pavel Dovgalyuk geschrieben: > > > > > However, I

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Pavel Dovgalyuk
> 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 Dovgalyuk geschrieben: > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Kevin Wolf
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 Dovgalyuk geschrieben: > > > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > But

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Kevin Wolf
Am 10.02.2016 um 14:33 hat Pavel Dovgalyuk geschrieben: > > 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

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Pavel Dovgalyuk
> 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 Dovgalyuk geschrieben: > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Kevin Wolf
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 need to hardcode something optional (and > > rarely used) in the hot code path that

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread 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 need to hardcode something optional (and > > >

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Kevin Wolf
Am 10.02.2016 um 13:05 hat Pavel Dovgalyuk geschrieben: > > -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

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-10 Thread Pavel Dovgalyuk
> 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't feel completely right, because block drivers are

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-09 Thread Kevin Wolf
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 blk_aio_ functions and replay subsystem. > All asynchronous block requests are added

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-09 Thread Pavel Dovgalyuk
> 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 blk_aio_ functions and replay

[Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-08 Thread Pavel Dovgalyuk
This patch introduces a set of functions that implement recording and replaying of block devices' operations. These functions form a thin layer between blk_aio_ functions and replay subsystem. All asynchronous block requests are added to the queue to be processed at deterministically invoked