[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/17] aio-wait: Increase num_waiters even in
Re: [Qemu-devel] [PATCH v2 03/17] aio-wait: Increase num_waiters even in home thread
Thu, 13 Sep 2018 17:11:30 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
On 13/09/2018 14:52, Kevin Wolf wrote:
> Even if AIO_WAIT_WHILE() is called in the home context of the
> AioContext, we still want to allow the condition to change depending on
> other threads as long as they kick the AioWait. Specfically block jobs
> can be running in an I/O thread and should then be able to kick a drain
> in the main loop context.
I don't understand the scenario very well. Why hasn't the main loop's
drain incremented num_waiters?
Note I'm not against the patch---though I would hoist the
atomic_inc/atomic_dec outside the if, since it's done in both branches.
- [Qemu-devel] [PATCH v2 00/17] Fix some jobs/drain/aio_poll related hangs, Kevin Wolf, 2018/09/13
- [Qemu-devel] [PATCH v2 04/17] test-bdrv-drain: Drain with block jobs in an I/O thread, Kevin Wolf, 2018/09/13
- [Qemu-devel] [PATCH v2 05/17] test-blockjob: Acquire AioContext around job_cancel_sync(), Kevin Wolf, 2018/09/13
- [Qemu-devel] [PATCH v2 06/17] job: Use AIO_WAIT_WHILE() in job_finish_sync(), Kevin Wolf, 2018/09/13
- [Qemu-devel] [PATCH v2 09/17] block-backend: Add .drained_poll callback, Kevin Wolf, 2018/09/13