[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->chi
From: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock |
Date: |
Fri, 29 Apr 2022 10:06:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
Am 28/04/2022 um 12:34 schrieb Stefan Hajnoczi:
> On Tue, Apr 26, 2022 at 04:51:06AM -0400, Emanuele Giuseppe Esposito wrote:
>> Next step is the most complex one: figure where to put the rdlocks.
>
> I got a little lost at this step but will hopefully understand more when
> reading the patches. Earlier it said there is a counter for readers, so
> it seems trivial to make it a recursive lock. I don't understand why you
> want to avoid a recursive locking - the complications you described stem
> from the fact that you want to avoid recursive locks?
I'll let Paolo to further elaborate on this. I think it would be cleaner
if we try at least not to have recursive locks.
>
> Secondly, can you describe the role of the lock? The text mentions the
> old AioContext lock that is being replaced but doesn't define this new
> lock in its own right. Is the idea to make ->parents and ->children list
> accesses thread-safe and all loops "safe" so they don't break when a BDS
> is removed?
Yes. Replace what AioContext lock is doing right now.
Emanuele
>
> Stefan
>
- [RFC PATCH v2 8/8] mirror: protect drains in coroutine with rdlock, (continued)
- [RFC PATCH v2 8/8] mirror: protect drains in coroutine with rdlock, Emanuele Giuseppe Esposito, 2022/04/26
- [RFC PATCH v2 6/8] block: assert that graph read and writes are performed correctly, Emanuele Giuseppe Esposito, 2022/04/26
- [RFC PATCH v2 5/8] block.c: wrlock in bdrv_replace_child_noperm, Emanuele Giuseppe Esposito, 2022/04/26
- Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock, Emanuele Giuseppe Esposito, 2022/04/27
- Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock, Stefan Hajnoczi, 2022/04/28
- Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock,
Emanuele Giuseppe Esposito <=