[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 09/18] throttle-groups: protect thr
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 09/18] throttle-groups: protect throttled requests with a CoMutex |
Date: |
Thu, 18 May 2017 14:08:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 18/05/2017 14:06, Alberto Garcia wrote:
> On Thu 11 May 2017 04:41:59 PM CEST, Paolo Bonzini wrote:
>
>> --- a/include/sysemu/block-backend.h
>> +++ b/include/sysemu/block-backend.h
>> @@ -72,11 +72,8 @@ typedef struct BlockDevOps {
>> * fields that must be public. This is in particular for QLIST_ENTRY() and
>> * friends so that BlockBackends can be kept in lists outside
>> block-backend.c */
>> typedef struct BlockBackendPublic {
>> - /* I/O throttling has its own locking, but also some fields are
>> - * protected by the AioContext lock.
>> - */
>> -
>> - /* Protected by AioContext lock. */
>> + /* throttled_reqs_lock protects the CoQueues for throttled requests. */
>> + CoMutex throttled_reqs_lock;
>> CoQueue throttled_reqs[2];
>>
>> /* Nonzero if the I/O limits are currently being ignored; generally
>> * it is zero. */
>> unsigned int io_limits_disabled;
>
> Does io_limits_disabled need locking too?
It uses atomic access since patch 3.
Paolo
- [Qemu-devel] [PATCH 04/18] block: access serialising_in_flight with atomic ops, (continued)
- [Qemu-devel] [PATCH 04/18] block: access serialising_in_flight with atomic ops, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 03/18] block: access io_limits_disabled with atomic ops, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 02/18] block: access quiesce_counter with atomic ops, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 05/18] block: access wakeup with atomic ops, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 09/18] throttle-groups: protect throttled requests with a CoMutex, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 06/18] block: access io_plugged with atomic ops, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 08/18] throttle-groups: do not use qemu_co_enter_next, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 07/18] throttle-groups: only start one coroutine from drained_begin, Paolo Bonzini, 2017/05/11
- [Qemu-devel] [PATCH 10/18] util: add stats64 module, Paolo Bonzini, 2017/05/11