On Tue, Mar 24, 2015 at 06:48:37PM +0100, Alberto Garcia wrote:
> On Tue, Mar 24, 2015 at 04:31:45PM +, Stefan Hajnoczi wrote:
>
> > > +/* get next bs round in round robin style */
> > > +token = throttle_group_next_bs(token);
> > > +while (token != start &&
> > > + qemu
On Tue, Mar 24, 2015 at 04:31:45PM +, Stefan Hajnoczi wrote:
> > +/* get next bs round in round robin style */
> > +token = throttle_group_next_bs(token);
> > +while (token != start &&
> > + qemu_co_queue_empty(&token->throttled_reqs[is_write])) {
>
> It's not safe to a
On Tue, Mar 10, 2015 at 05:30:48PM +0200, Alberto Garcia wrote:
> +/* Return the next BlockDriverState in the round-robin sequence with
> + * pending I/O requests.
> + *
> + * @bs:the current BlockDriverState
> + * @is_write: the type of operation (read/write)
> + * @ret: the next Bl
On Tue, Mar 10, 2015 at 05:30:48PM +0200, Alberto Garcia wrote:
> @@ -179,10 +179,11 @@ static void bdrv_throttle_write_timer_cb(void *opaque)
> }
>
> /* should be called before bdrv_set_io_limits if a limit is set */
> -void bdrv_io_limits_enable(BlockDriverState *bs)
> +void bdrv_io_limits_en
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