qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: 'Paolo Bonzini' <pbonzini@redhat.com>,
	'Pavel Dovgalyuk' <pavel.dovgaluk@ispras.ru>,
	qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, mst@redhat.com, jasowang@redhat.com,
	quintela@redhat.com, agraf@suse.de, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v2 02/10] block: set snapshot option for block devices in blkreplay module
Date: Fri, 16 Sep 2016 10:55:42 +0300	[thread overview]
Message-ID: <001a01d20fef$b9a62700$2cf27500$@ru> (raw)
In-Reply-To: <7d034a73-77d6-d79f-7b7b-137d8408e514@redhat.com>

> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> On 15/09/2016 11:00, Pavel Dovgalyuk wrote:
> > diff --git a/docs/replay.txt b/docs/replay.txt
> > index 347b2ff..5be8f25 100644
> > --- a/docs/replay.txt
> > +++ b/docs/replay.txt
> > @@ -196,6 +196,14 @@ 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.
> >
> > +blkdriver also supports overlay option, which allows creating persistent
> > +overlay file for saving and reloading VM snapshots in record/replay modes.
> > +Replay mechanism automatically creates one snapshot named 'replay_init' to
> > +allow rewinding execution while replaying.
> > +Overlay file may be specified as follows:
> > + -drive driver=blkreplay,if=none,image=img-direct,
> > +        overlay=overlay.qcow2,id=img-blkreplay
> 
> So in this case the image is actually overlay.qcow2, and it is created
> with img-direct as the backing file? 

Right.

> Since you have to create
> overlay.qcow2 outside QEMU anyway, overlay.qcow2 might as well be the
> "image".  That is, you could choose between:
> 
>    -drive driver=blkreplay,if=none,image=overlay.qcow2,id=img-blkreplay \
>    -rr snapshot=replay_init,...
> 
>    -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay
> 
> The temporary snapshot would be created if there's no "-rr snapshot" option
> on the command line.
> 
> Does this make sense?

There are two different parts:
 - creating an overlay
 - creating the snapshot

Overlay is needed to preserve the state of the original backing file.
In the current version temporary overlay is always created at start of qemu.
Then all changes are destroyed at exit and disk remain the same.
It allows replaying the execution from the same disk state.

To allow reverse execution we have to create some snapshots, that will allow
rewinding the execution. Snapshots have to be written on some non-temporary overlay.

I don't think that it is convenient forcing user to create overlay manually.
Common debugging scenario includes multiple recording passes until the bug manifests
itself. Every new execution recorded should be accompanied by creating an overlay
to assure that the execution is started from the same disk state.

Specifying initial snapshot name makes sense if we want to suppress -loadvm option.
Then replay may be started from any state without using -loadvm.

Pavel Dovgalyuk

  parent reply	other threads:[~2016-09-16  7:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15  9:00 [Qemu-devel] [PATCH v2 00/10] replay additions Pavel Dovgalyuk
2016-09-15  9:00 ` [Qemu-devel] [PATCH v2 01/10] record/replay: add network support Pavel Dovgalyuk
2016-09-15  9:00 ` [Qemu-devel] [PATCH v2 02/10] block: set snapshot option for block devices in blkreplay module Pavel Dovgalyuk
2016-09-15  9:25   ` Paolo Bonzini
2016-09-15  9:36     ` Paolo Bonzini
2016-09-16  7:55     ` Pavel Dovgalyuk [this message]
2016-09-16  9:28       ` Paolo Bonzini
2016-09-16  9:36         ` Pavel Dovgalyuk
2016-09-16  9:49           ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 03/10] block: don't make snapshots for filters Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 04/10] replay: save/load initial state Pavel Dovgalyuk
2016-09-15  9:25   ` Paolo Bonzini
2016-09-16  7:56     ` Pavel Dovgalyuk
2016-09-16  9:29       ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 05/10] replay: move internal data to the structure Pavel Dovgalyuk
2016-09-15  9:34   ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 06/10] replay: vmstate for replay module Pavel Dovgalyuk
2016-09-15  9:37   ` Paolo Bonzini
2016-09-16  7:36     ` Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 07/10] replay: allow replay stopping and restarting Pavel Dovgalyuk
2016-09-15  9:38   ` Paolo Bonzini
2016-09-16  6:35     ` Pavel Dovgalyuk
2016-09-16  8:55       ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 08/10] kvmvapic: fix state change handler Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 09/10] pcspk: adding vmstate for save/restore Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 10/10] integratorcp: " Pavel Dovgalyuk
2016-09-15  9:12 ` [Qemu-devel] [PATCH v2 00/10] replay additions Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001a01d20fef$b9a62700$2cf27500$@ru' \
    --to=dovgaluk@ispras.ru \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).