Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-04-09 Thread Stefan Hajnoczi
On Mon, Mar 30, 2015 at 07:19:42PM +0300, Alberto Garcia wrote: > @@ -1941,9 +1951,11 @@ void qmp_block_set_io_throttle(const char *device, > int64_t bps, int64_t bps_rd, > aio_context_acquire(aio_context); > > if (!bs->io_limits_enabled && throttle_enabled(&cfg)) { > -bdrv_io_

Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-04-02 Thread Alberto Garcia
On Thu, Apr 02, 2015 at 11:26:30AM +0800, Fam Zheng wrote: > > > Thinking about this, I'd slightly prefer a canonical throttle > > > group definition rather than patching the existing parameters: > > > > > > -object throttle-group,id=tg0,bps=100,iops=200,iops-max=1000 \ > > > -drive file=foo,id=f

Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-04-01 Thread Fam Zheng
On Wed, 04/01 17:18, Alberto Garcia wrote: > On Wed, Apr 01, 2015 at 10:44:51PM +0800, Fam Zheng wrote: > > > > +# @group: #optional throttle group name (Since 2.3) > > > > We should probably elaborate (here, and at other places of @group > > appearances): @device is used as group name. This is u

Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-04-01 Thread Alberto Garcia
On Wed, Apr 01, 2015 at 10:44:51PM +0800, Fam Zheng wrote: > > +# @group: #optional throttle group name (Since 2.3) > > We should probably elaborate (here, and at other places of @group > appearances): @device is used as group name. This is useful since > other devices could use this device name

Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-04-01 Thread Fam Zheng
On Mon, 03/30 19:19, Alberto Garcia wrote: > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 7873084..d8211b7 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -990,6 +990,8 @@ > # > # @iops_size: #optional an I/O size in bytes (Since 1.7) > # > +# @group: #o

[Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-03-30 Thread Alberto Garcia
The throttle group support use a cooperative round robin scheduling algorithm. The principles of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS computes if a wait must be done and arms the right timer. - If a wait must be done the token t

[Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-03-30 Thread Alberto Garcia
The throttle group support use a cooperative round robin scheduling algorithm. The principles of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS computes if a wait must be done and arms the right timer. - If a wait must be done the token t

[Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-03-26 Thread Alberto Garcia
The throttle group support use a cooperative round robin scheduling algorithm. The principles of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS computes if a wait must be done and arms the right timer. - If a wait must be done the token t