Re: [Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-18 Thread Kevin Wolf
Am 17.05.2017 um 22:16 hat Eric Blake geschrieben: > On 05/17/2017 12:09 PM, Stefan Hajnoczi wrote: > > Calling aio_poll() directly may have been fine previously, but this is > > the future, man! > > lol > > > The difference between an aio_poll() loop and > > BDRV_POLL_WHILE() is that

Re: [Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-17 Thread Paolo Bonzini
> I'm surprised at how many separate hangs we actually had! Note that I have seen quite a few before, though I am not sure about the details and the reproducibility. The release/acquire was hidden behind RFifoLock contention callbacks instead of BDRV_POLL_WHILE. Paolo > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-17 Thread Eric Blake
On 05/17/2017 12:09 PM, Stefan Hajnoczi wrote: > Calling aio_poll() directly may have been fine previously, but this is > the future, man! lol > The difference between an aio_poll() loop and > BDRV_POLL_WHILE() is that BDRV_POLL_WHILE() releases the AioContext > around aio_poll(). > > This

[Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-17 Thread Stefan Hajnoczi
Calling aio_poll() directly may have been fine previously, but this is the future, man! The difference between an aio_poll() loop and BDRV_POLL_WHILE() is that BDRV_POLL_WHILE() releases the AioContext around aio_poll(). This allows the IOThread to run fd handlers or BHs to complete the request.