Re: [Qemu-devel] [PATCH 2/9] throttle: Add throttle group infrastructure

2015-03-04 Thread Stefan Hajnoczi
On Wed, Mar 04, 2015 at 11:18:21AM +0100, Alberto Garcia wrote: On Tue, Mar 03, 2015 at 10:38:45AM -0600, Stefan Hajnoczi wrote: +qemu_mutex_init(tg-lock); +throttle_init(tg-ts); +QLIST_INIT(tg-head); +tg-refcount = 1; + +/* insert new entry in the list */

Re: [Qemu-devel] [PATCH 2/9] throttle: Add throttle group infrastructure

2015-03-04 Thread Alberto Garcia
On Tue, Mar 03, 2015 at 10:38:45AM -0600, Stefan Hajnoczi wrote: +qemu_mutex_init(tg-lock); +throttle_init(tg-ts); +QLIST_INIT(tg-head); +tg-refcount = 1; + +/* insert new entry in the list */ +QTAILQ_INSERT_TAIL(throttle_groups, tg, list); It is safest to

Re: [Qemu-devel] [PATCH 2/9] throttle: Add throttle group infrastructure

2015-03-03 Thread Stefan Hajnoczi
On Fri, Feb 13, 2015 at 06:06:10PM +0200, Alberto Garcia wrote: From: Benoît Canet benoit.ca...@nodalink.com The throttle_group_incref increment the refcount of a throttle group given it's s/it's/its/ http://www.its-not-its.info/ +typedef struct ThrottleGroup { +char name[32]; +

[Qemu-devel] [PATCH 2/9] throttle: Add throttle group infrastructure

2015-02-13 Thread Alberto Garcia
From: Benoît Canet benoit.ca...@nodalink.com The throttle_group_incref increment the refcount of a throttle group given it's name and return the associated throttle state. The throttle_group_unref is the mirror function for cleaning up. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com