[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->childr
From: |
Paolo Bonzini |
Subject: |
Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept |
Date: |
Thu, 31 Mar 2022 11:59:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
On 3/30/22 18:02, Paolo Bonzini wrote:
On 3/30/22 12:53, Hanna Reitz wrote:
Seems a good compromise between drains and rwlock. What do you think?
Well, sounds complicated. So I’m asking myself whether this would be
noticeably better than just an RwLock for graph modifications, like
the global lock Vladimir has proposed.
[try again, this time with brain connected]
A global lock would have to be taken by all iothreads on every I/O
operation, even a CoRwLock would not scale because it has a global
CoMutex inside and rdlock/unlock both take it. Even if the critical
section is small, the cacheline bumping would be pretty bad.
Perhaps we could reuse the code in cpus-common.c, which relies on a list
of possible readers and is quite cheap (two memory barriers basically)
for readers. Here we would have a list of AioContexts (or perhaps
BlockDriverStates?) as the possible readers.
The slow path uses a QemuMutex, a QemuCond for the readers and a
QemuCond for the writers. The reader QemuCond can be replaced by a
CoQueue, I think.
Paolo
- Re: [RFC PATCH 1/5] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED, (continued)
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/01
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Stefan Hajnoczi, 2022/03/02
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/09
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Stefan Hajnoczi, 2022/03/10
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/17
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Hanna Reitz, 2022/03/30
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/30
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Hanna Reitz, 2022/03/30
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Paolo Bonzini, 2022/03/30
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept,
Paolo Bonzini <=
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/31
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Paolo Bonzini, 2022/03/31
Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Vladimir Sementsov-Ogievskiy, 2022/03/02
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Stefan Hajnoczi, 2022/03/02
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/09
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Vladimir Sementsov-Ogievskiy, 2022/03/21
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Vladimir Sementsov-Ogievskiy, 2022/03/21
- Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept, Emanuele Giuseppe Esposito, 2022/03/30