qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support
Date: Thu, 9 Apr 2015 15:22:57 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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_limits_enable(bs);
> +        bdrv_io_limits_enable(bs, has_group ? group : device);
>      } else if (bs->io_limits_enabled && !throttle_enabled(&cfg)) {
>          bdrv_io_limits_disable(bs);
> +    } else if (bs->io_limits_enabled && throttle_enabled(&cfg)) {
> +        bdrv_io_limits_update_group(bs, has_group ? group : device);
>      }
>  
>      if (bs->io_limits_enabled) {

The semantics are inconsistent:

1. Create drive0 with throttle group "mygroup".
2. Issue block-set-io-throttle device="drive0"

The result is that a new throttle group called "drive0" is created.  I
expected to modify the throttling configuration for drive0 (i.e.
"mygroup").

Now let's disable the throttle group:

3. Issue block-set-io-throttle with 0 values for device="drive0"

The result is that "mygroup" is changed to all 0s.

Enable should behave like disable and operate on the device's throttle
group.

Stefan

Attachment: pgpW803zdDnrI.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]