[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock
From: |
Max Reitz |
Subject: |
Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock |
Date: |
Thu, 20 Feb 2020 10:10:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 20.02.20 08:21, Vladimir Sementsov-Ogievskiy wrote:
> 17.02.2020 16:38, Max Reitz wrote:
>> On 27.11.19 19:08, Vladimir Sementsov-Ogievskiy wrote:
[...]
>>> + if (!block_copy_wait_one(s, start, bytes)) {
>>> + /* No dirty bits and nothing to wait: the whole request
>>> is done */
>>
>> Wouldn’t it make more sense to keep block_copy_wait_one() a loop (i.e.,
>> keep it as block_copy_wait_inflight_reqs()) that returns whether it
>> waited or not? Because I suppose if we had to wait for anything, we
>> might as well wait for everything in the range.
>
> No, we don't need to wait all. If some dirty bits appeared we may start
> copy them
> immediately, not waiting for others.
OK, especially considering you’re aiming for block_copy(0, disk_size)
eventually.
Max
signature.asc
Description: OpenPGP digital signature