On 24/01/2017 13:04, Fam Zheng wrote:
> 
> All in all I think we should skip external handlers regardless of
> aio_disable_external(), or even skip try_poll_mode, in nested aio_poll()'s. 
> The
> reasons are 1) many nested aio_poll()'s don't have bdrv_drained_begin, so this
> check is not sufficient [...] bdrv_flush()
> spin longer than necessary, if not forever, when the guest keeps submitting 
> more
> requests with ioeventfd.


I'm not sure I understand why this is related.  aio_poll() only tries
poll mode once, so bdrv_flush would only spin until the fsync is complete.

Nested aio_polls don't have bdrv_drained_begin because draining matters
over the whole section where you need atomicity (e.g. taking a live
snapshot).  It doesn't matter for single I/O operation.

Paolo

Reply via email to