qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] AIO and savevm
Date: Sun, 3 Sep 2006 11:23:00 +0100	[thread overview]
Message-ID: <200609031123.01431.paul@codesourcery.com> (raw)
In-Reply-To: <BAY104-F22BFAB9168745165A5AD9BFF320@phx.gbl>

On Sunday 03 September 2006 09:51, Blue Swirl wrote:
> >Implementing it this way does mean savevm can effect the guest VM state
> > (it causes all pending IO to complete immediately). However this should
> > be safe, ie. it could occur by chance anyway, and qemu isn't deterministic
> > to start with. 
>
> What would be the right place for the AIO flush, how about bdrv_flush?
> Would it be OK to add bdrv_flush just before qemu_fopen_bdrv in do_savevm?

No bdrv_flush if completely different, and has no observable effect[1].

When savevm is issued, you need to halt the guest CPUs, and wait for all IO to 
complete. While doing this you need to allow device AIO completion routines 
to run, which may trigger additional IO. Once all IO has been completed you 
should then be able to safely save state.

Paul

[1] ie. should be safe to call bdrv_flush at any time, and bdrv_flush is never 
necessary for correct operations. It's purpose is to help ensure data 
consistency if the host machine dies unexpectedly.

  reply	other threads:[~2006-09-03 10:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-02 15:28 [Qemu-devel] AIO and savevm Blue Swirl
2006-09-02 19:34 ` Paul Brook
2006-09-03  8:51   ` Blue Swirl
2006-09-03 10:23     ` Paul Brook [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-03 10:42 Blue Swirl
2006-09-03 10:49 ` Paul Brook
2006-09-03 11:14 Blue Swirl
2006-09-03 12:08 ` Paul Brook

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=200609031123.01431.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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).