qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 0/6] block-status cache for data regions


From: Hanna Reitz
Subject: Re: [PATCH v3 0/6] block-status cache for data regions
Date: Tue, 7 Sep 2021 11:23:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 12.08.21 10:41, Hanna Reitz wrote:
Hi,

See the cover letter from v1 for the general idea:
https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg00843.html

Cover letter from v2, introducing RCU locking:
https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg01060.html


v3:
- Patch 2:
   - Add rcu_head object to BdrvBlockStatusCache, so we can use
     g_free_rcu() to free it instead of synchronize_rcu()+g_free()
   - Use qatomic_rcu_read() every time we read bs->block_status_cache
     (except in bdrv_close(), where no concurrency is possible)
   - Use RCU_READ_LOCK_GUARD() instead of WITH_RCU_READ_LOCK_GUARD() in
     functions where we lock the whole scope anyway
   - Same for QEMU_LOCK_GUARD() instead of WITH_QEMU_LOCK_GUARD() in
     bdrv_bsc_fill()
   - Drop from_cache variable in bdrv_co_block_status()
     (was an artifact from v1, which had a different control flow and
     needed this variable)
   - Assert that local_map returned from a protocol driver’s
     bdrv_co_block_status() implementation is equal to the offset we
     passed to it (see comment there for why we should do this)

- Patch 3:
   - Add note why block drivers should return larger *pnum values in
     addition to just saying that it’s allowed

Thanks for the reviews, I’ve added the `local_file == bs` assertion in patch 2 as suggested by Vladimir (and updated the comment to match) and applied the series to my block branch:

https://github.com/XanClic/qemu/commits/block

Hanna




reply via email to

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