qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-block] [PATCH 3/7] block: move restarting of thro


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 3/7] block: move restarting of throttled reqs to block/throttle-groups.c
Date: Tue, 29 Mar 2016 16:29:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


On 29/03/2016 16:14, Alberto Garcia wrote:
> On Thu 24 Mar 2016 05:39:22 PM CET, Paolo Bonzini wrote:
>> @@ -335,6 +346,11 @@ void throttle_group_config(BlockDriverState *bs, 
>> ThrottleConfig *cfg)
>>      }
>>      throttle_config(ts, tt, cfg);
>>      qemu_mutex_unlock(&tg->lock);
>> +
>> +    aio_context_acquire(bdrv_get_aio_context(bs));
>> +    qemu_co_enter_next(&bs->throttled_reqs[0]);
>> +    qemu_co_enter_next(&bs->throttled_reqs[1]);
>> +    aio_context_release(bdrv_get_aio_context(bs));
>>  }
> 
> None of the functions in throttle-groups.c acquire the AioContext
> because they all assume that the caller is doing it, so we can do the
> same here for consistency.

It turns out the caller (qmp_block_set_io_throttle) _is_ doing it, so we
can get rid of the aio_context_acquire/release pair here too.

Paolo



reply via email to

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