[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] AIO and savevm
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] AIO and savevm |
Date: |
Sun, 3 Sep 2006 11:23:00 +0100 |
User-agent: |
KMail/1.9.4 |
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.