qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontex


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontext locks
Date: Mon, 26 Sep 2022 15:21:29 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/18/22 20:12, Emanuele Giuseppe Esposito wrote:
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -911,7 +911,6 @@ static void run_block_job(BlockJob *job, Error
**errp)
       AioContext *aio_context = block_job_get_aio_context(job);
       int ret = 0;
   -    aio_context_acquire(aio_context);
       job_lock();
       job_ref_locked(&job->job);
       do {
aio_poll() call here, doesn't require aio_context to be acquired?
On the contrary I think, if you see in AIO_WAIT_WHILE we explicitly
release it because we don't want to allow something else to run with the
aiocontext acquired.


Still, in AIO_WAIT_WHILE() we release ctx_, but do 
aio_poll(qemu_get_aio_context(), true), so we poll in other context.

But here in qemu-img.c we drop aiocontext lock exactly for aio_context, which 
is an argument of aio_poll()..

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]