From: Paolo Bonzini <pbonzini@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org
Cc: eesposit@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com
Subject: Re: [PATCH] async: the main AioContext is only "current" if under the BQL
Date: Wed, 9 Jun 2021 14:20:13 +0200 [thread overview]
Message-ID: <f7b293a3-a146-c39c-6ca1-b7dad2735248@redhat.com> (raw)
In-Reply-To: <85de0237-b993-b365-aa49-755888ef91e2@virtuozzo.com>
On 09/06/21 13:40, Vladimir Sementsov-Ogievskiy wrote:
>>
>>
>> And in gdb all looks like aio_co_wake() in my own separate thread
>> leads to coroutine execution exactly in my own thread.. So, it don't
>> dead-lock on trying to acquire the context, instead it somehow enter
>> to a coroutine. And then deadlock because called coroutine tries to
>> lock the mutex, that already locked before (in the code that thinks
>> that aio_co_wake() will only schedule the coroutine).
>>
>> I'll dig into it a bit more.
>>
>>
>
> Aha, that's because qemu_mutex_iothread_locked() from
> stubs/iothread-lock.c is used, which always returns true.
Ok, you can change it to always return false with this patch. Which is
nicer, as it means we have less special casing going on in the tools and
it matches the fact that there are no vCPU threads.
Paolo
prev parent reply other threads:[~2021-06-09 12:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 10:53 [PATCH] async: the main AioContext is only "current" if under the BQL Paolo Bonzini
2021-06-09 11:32 ` Vladimir Sementsov-Ogievskiy
2021-06-09 11:40 ` Vladimir Sementsov-Ogievskiy
2021-06-09 12:20 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7b293a3-a146-c39c-6ca1-b7dad2735248@redhat.com \
--to=pbonzini@redhat.com \
--cc=eesposit@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).