qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: init bs->io_base correctly to avoid lock


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] block: init bs->io_base correctly to avoid locking
Date: Thu, 10 Jan 2013 14:29:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Il 10/01/2013 13:58, Peter Lieven ha scritto:
> 
> Am 10.01.2013 um 13:15 schrieb Paolo Bonzini <address@hidden>:
> 
>> Il 10/01/2013 13:12, Peter Lieven ha scritto:
>>>>>
>>>>> But perhaps we do not need to start a slice at all when iolimits are
>>>>> set.  That is, do
>>>>>
>>>>> bs->slice_start = bs->slice_end = bs->slice_time = 0;
>>>>>
>>>>> or perhaps even nothing at all since bdrv_io_limits_disable should have
>>>>> written those exact values.
>>> Or it was set when the BlockDriverState was initialized.
>>>
>>> I am not familiar enough with the io limits code to decide if not starting 
>>> a slice
>>> is also correct.
>>
>> I haven't tested it, but if it works, I think it is better.
>>
>> Think of it this way: it doesn't matter whether the first I/O operation
>> comes immediately after limits are set, or 10 seconds later.  In the
>> latter case, bdrv_exceed_io_limits will _already_ start a new slice.  It
>> is better to be consistent and always delay the start of the slice.
>>
> 
> seems to be working as well.
> 
> are you happy with:
> 
> block: fix initialization in bdrv_io_limits_enable()

Sure.

Paolo




reply via email to

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