qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] async: the main AioContext is only "current" if under the BQ


From: Paolo Bonzini
Subject: Re: [PATCH] async: the main AioContext is only "current" if under the BQL
Date: Wed, 9 Jun 2021 14:20:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

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




reply via email to

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