On 24/01/2022 15:22, Paolo Bonzini wrote: > 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? > Yes. Thank you, Emanuele
- [PATCH v3 09/16] jobs: remove aiocontext lock... Emanuele Giuseppe Esposito
- Re: [PATCH v3 09/16] jobs: remove aiocon... Paolo Bonzini
- [PATCH v3 15/16] job.c: enable job lock/unloc... Emanuele Giuseppe Esposito
- Re: [PATCH v3 15/16] job.c: enable job l... Paolo Bonzini
- [PATCH v3 14/16] job.c: use job_get_aio_conte... Emanuele Giuseppe Esposito
- Re: [PATCH v3 14/16] job.c: use job_get_... Paolo Bonzini
- Re: [PATCH v3 14/16] job.c: use job_... Emanuele Giuseppe Esposito
- Re: [PATCH v3 14/16] job.c: use ... Emanuele Giuseppe Esposito
- Re: [PATCH v3 14/16] job.c: use job_... Emanuele Giuseppe Esposito
- Re: [PATCH v3 14/16] job.c: use ... Paolo Bonzini
- Re: [PATCH v3 14/16] job.c: ... Emanuele Giuseppe Esposito
- [PATCH v3 03/16] job.h: define locked functio... Emanuele Giuseppe Esposito
- Re: [PATCH v3 03/16] job.h: define locke... Paolo Bonzini
- Re: [PATCH v3 03/16] job.h: define l... Emanuele Giuseppe Esposito
- Re: [PATCH v3 03/16] job.h: defi... Vladimir Sementsov-Ogievskiy
- Re: [PATCH v3 03/16] job.h: ... Paolo Bonzini
- Re: [PATCH v3 03/16] jo... Emanuele Giuseppe Esposito
- Re: [PATCH v3 00/16] job: replace AioContext ... Paolo Bonzini