qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alberto Garcia <berto@igalia.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support
Date: Fri, 10 Apr 2015 10:52:18 +0100	[thread overview]
Message-ID: <20150410095218.GA23555@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20150410075834.GA18121@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]

On Fri, Apr 10, 2015 at 09:58:34AM +0200, Alberto Garcia wrote:
> On Thu, Apr 09, 2015 at 03:22:57PM +0100, Stefan Hajnoczi 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").
> 
> That's right. What we can do is choose the group to update using the
> following criteria, in order of precedence:
> 
> 1) The 'group' parameter from block-set-io-throttle.
> 2) The group the device is already member of.
> 3) A new group ("drive0" in this example).
> 
> Currently we're not doing 2).

Great, it makes sense to add 2).

> > 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.
> 
> No, that simply removes the device from the group without touching its
> configuration:
> 
> > >      } else if (bs->io_limits_enabled && !throttle_enabled(&cfg)) {
> > >          bdrv_io_limits_disable(bs);
> 
> The group name passed by the user is actually not used in this case.

You are right.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-04-10  9:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 16:19 [Qemu-devel] [PATCH v6 0/7] Block Throttle Group Support Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 1/7] throttle: Extract timers from ThrottleState into a separate structure Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 2/7] throttle: Add throttle group infrastructure Alberto Garcia
2015-04-09 12:28   ` Stefan Hajnoczi
2015-03-30 16:19 ` [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests Alberto Garcia
2015-04-01 10:00   ` Fam Zheng
2015-04-09 12:30   ` Stefan Hajnoczi
2015-03-30 16:19 ` [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support Alberto Garcia
2015-04-01 14:44   ` Fam Zheng
2015-04-01 15:18     ` Alberto Garcia
2015-04-02  3:26       ` Fam Zheng
2015-04-02  7:36         ` Alberto Garcia
2015-04-09 14:22   ` Stefan Hajnoczi
2015-04-10  7:58     ` Alberto Garcia
2015-04-10  9:52       ` Stefan Hajnoczi [this message]
2015-04-10  9:55         ` Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 5/7] throttle: acquire the ThrottleGroup lock in bdrv_swap() Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 6/7] throttle: add the name of the ThrottleGroup to BlockDeviceInfo Alberto Garcia
2015-04-01  9:59   ` Fam Zheng
2015-04-01 10:06     ` Alberto Garcia
2015-04-01 14:05       ` Fam Zheng
2015-03-30 16:19 ` [Qemu-devel] [PATCH 7/7] throttle: Update throttle infrastructure copyright Alberto Garcia
  -- strict thread matches above, loose matches on Subject: below --
2015-03-30 14:16 [Qemu-devel] [PATCH v5 0/7] Block Throttle Group Support Alberto Garcia
2015-03-30 14:16 ` [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support Alberto Garcia
2015-03-26 17:24 [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support Alberto Garcia
2015-03-26 17:24 ` [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support Alberto Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150410095218.GA23555@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).