Re: [Qemu-devel] AIO and savevm

2006-09-03 Thread Paul Brook
On Sunday 03 September 2006 12:14, Blue Swirl wrote: > >qemu_aio_poll doesn't wait. It returns immediately if IO has not completed > >yet. > > You're right, sorry. How's this version then? Though there is a race > condition where the AIO signal is received between checking for AIO and > waiting for

Re: [Qemu-devel] AIO and savevm

2006-09-03 Thread Blue Swirl
qemu_aio_poll doesn't wait. It returns immediately if IO has not completed yet. You're right, sorry. How's this version then? Though there is a race condition where the AIO signal is received between checking for AIO and waiting for it. ___

Re: [Qemu-devel] AIO and savevm

2006-09-03 Thread Paul Brook
On Sunday 03 September 2006 11:42, Blue Swirl wrote: > >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 y

Re: [Qemu-devel] AIO and savevm

2006-09-03 Thread Blue Swirl
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. How's this patch? Qemu

Re: [Qemu-devel] AIO and savevm

2006-09-03 Thread Paul Brook
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 wit

Re: [Qemu-devel] AIO and savevm

2006-09-03 Thread Blue Swirl
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 be chance anyway, and qemu isn't deterministic to start with. What would be the right place for the AIO flush, how about b

Re: [Qemu-devel] AIO and savevm

2006-09-02 Thread Paul Brook
> I don't think savevm works reliably together with current AIO. At least > some kind of AIO flushing or completion waiting should happen and then this > should be done before any devices have started saving their state. Is this > correct? Correct. Implementing it this way does mean savevm can ef

[Qemu-devel] AIO and savevm

2006-09-02 Thread Blue Swirl
Hi, I don't think savevm works reliably together with current AIO. At least some kind of AIO flushing or completion waiting should happen and then this should be done before any devices have started saving their state. Is this correct?