|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v3 14/16] job.c: use job_get_aio_context() |
Date: | Mon, 24 Jan 2022 15:22:48 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
On 1/21/22 16:18, Emanuele Giuseppe Esposito wrote:
Better to use aio_co_schedule here, too, and move it under the previous WITH_JOB_LOCK_GUARD.Unfortunately this does not work straightforward: aio_co_enter invokes aio_co_schedule only if the context is different from the main loop, otherwise it can directly enter the coroutine with qemu_aio_coroutine_enter. So always replacing it with aio_co_schedule breaks the unit tests assumptions, as they expect that when control is returned the job has already executed.A possible solution is to aio_poll() on the condition we want to assert, waiting for the bh to be scheduled. But I don't know if this is then useful to test something.
I think you sorted that out, based on IRC conversation? Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |