[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] throttle: Add throttle group infrastructure
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] throttle: Add throttle group infrastructure |
Date: |
Tue, 24 Mar 2015 15:03:07 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Mar 10, 2015 at 05:30:46PM +0200, Alberto Garcia wrote:
> +typedef struct ThrottleGroup {
> + char *name; /* This is constant during the lifetime of the group */
Is this also protected by throttle_groups_lock?
I guess throttle_groups_lock must be held in order to read this field -
otherwise there is a risk that the object is freed unless you have
already incremented the refcount.
> +
> + QemuMutex lock;
What does this lock protect? I guess 'ts', 'head', and 'tokens' fields.
Please document it.
> + ThrottleState ts;
> + QLIST_HEAD(, BlockDriverState) head;
> + BlockDriverState *tokens[2];
pgpfkFFHMvJ7m.pgp
Description: PGP signature
[Qemu-devel] [PATCH 3/6] throttle: Add throttle group infrastructure tests, Alberto Garcia, 2015/03/10
[Qemu-devel] [PATCH 5/6] throttle: add the name of the ThrottleGroup to BlockDeviceInfo, Alberto Garcia, 2015/03/10
[Qemu-devel] [PATCH 1/6] throttle: Extract timers from ThrottleState into a separate structure, Alberto Garcia, 2015/03/10
[Qemu-devel] [PATCH 4/6] throttle: Add throttle group support, Alberto Garcia, 2015/03/10