qemu-block
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v2 3/8] block: introduce a lock to protect graph operatio


From: Paolo Bonzini
Subject: Re: [RFC PATCH v2 3/8] block: introduce a lock to protect graph operations
Date: Tue, 26 Apr 2022 17:00:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/26/22 10:51, Emanuele Giuseppe Esposito wrote:
If a coroutine changes AioContext, the counter in the original and new
AioContext are left intact, since the writer does not care where is the
reader, but only if there is one.

"As a result, some AioContexts might have a negative reader count, to balance the positive count of the AioContext that took the lock. This also means that when an AioContext is deleted it may have a nonzero reader count. In that case we transfer the count to a global shared counter..."

Paolo

If instead the original AioContext gets deleted, we need to transfer the
current amount of readers in a global shared counter, so that the writer
is always aware of all readers.




reply via email to

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