From: Fam Zheng <famz@redhat.com>
To: "Benoît Canet" <benoit@irqsave.net>
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH V5 3/5] block: Enable the new throttling code in the block layer.
Date: Wed, 14 Aug 2013 17:50:30 +0800 [thread overview]
Message-ID: <20130814095030.GE11081@localhost.localdomain> (raw)
In-Reply-To: <20130814093125.GC11081@localhost.localdomain>
On Wed, 08/14 17:31, Fam Zheng wrote:
> On Mon, 08/12 18:53, Benoît Canet wrote:
> > Signed-off-by: Benoit Canet <benoit@irqsave.net>
> > @@ -1262,7 +1260,7 @@ void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
> > int64_t bps_wr, int64_t iops, int64_t iops_rd,
> > int64_t iops_wr, Error **errp)
> > {
> > - BlockIOLimit io_limits;
> > + ThrottleConfig cfg;
> > BlockDriverState *bs;
> >
> > bs = bdrv_find(device);
> > @@ -1271,27 +1269,37 @@ void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
> > return;
> > }
> >
> > - io_limits.bps[BLOCK_IO_LIMIT_TOTAL] = bps;
> > - io_limits.bps[BLOCK_IO_LIMIT_READ] = bps_rd;
> > - io_limits.bps[BLOCK_IO_LIMIT_WRITE] = bps_wr;
> > - io_limits.iops[BLOCK_IO_LIMIT_TOTAL]= iops;
> > - io_limits.iops[BLOCK_IO_LIMIT_READ] = iops_rd;
> > - io_limits.iops[BLOCK_IO_LIMIT_WRITE]= iops_wr;
> > + cfg.buckets[THROTTLE_BPS_TOTAL].ups = bps;
> > + cfg.buckets[THROTTLE_BPS_READ].ups = bps_rd;
> > + cfg.buckets[THROTTLE_BPS_WRITE].ups = bps_wr;
> > +
> > + cfg.buckets[THROTTLE_OPS_TOTAL].ups = iops;
> > + cfg.buckets[THROTTLE_OPS_READ].ups = iops_rd;
> > + cfg.buckets[THROTTLE_OPS_WRITE].ups = iops_wr;
> > +
> > + cfg.buckets[THROTTLE_BPS_TOTAL].max = 0;
> > + cfg.buckets[THROTTLE_BPS_READ].max = 0;
> > + cfg.buckets[THROTTLE_BPS_WRITE].max = 0;
> > +
> > + cfg.buckets[THROTTLE_OPS_TOTAL].max = 0;
> > + cfg.buckets[THROTTLE_OPS_READ].max = 0;
> > + cfg.buckets[THROTTLE_OPS_WRITE].max = 0;
> >
> > - if (!do_check_io_limits(&io_limits, errp)) {
> > + cfg.unit_size = BDRV_SECTOR_SIZE;
>
> Does this mean user set bps limit in sector now? I think we should be
> consistent to existing parameter unit.
>
> > + cfg.op_size = 0;
>
> Why not set op_size to 1?
>
Never mind. You se it to 0 here and it's the condition of setting
unit=1.
Fam
next prev parent reply other threads:[~2013-08-14 9:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 16:53 [Qemu-devel] [PATCH V5 0/5] Continuous Leaky Bucket Throttling Benoît Canet
2013-08-12 16:53 ` [Qemu-devel] [PATCH V5 1/5] throttle: Add a new throttling API implementing continuous leaky bucket Benoît Canet
2013-08-14 8:52 ` Fam Zheng
2013-08-16 11:45 ` Stefan Hajnoczi
2013-08-19 11:27 ` Paolo Bonzini
2013-08-12 16:53 ` [Qemu-devel] [PATCH V5 2/5] throttle: Add units tests Benoît Canet
2013-08-12 16:53 ` [Qemu-devel] [PATCH V5 3/5] block: Enable the new throttling code in the block layer Benoît Canet
2013-08-14 9:31 ` Fam Zheng
2013-08-14 9:50 ` Fam Zheng [this message]
2013-08-16 12:02 ` Stefan Hajnoczi
2013-08-12 16:53 ` [Qemu-devel] [PATCH V5 4/5] block: Add support for throttling burst max in QMP and the command line Benoît Canet
2013-08-16 12:07 ` Stefan Hajnoczi
2013-08-12 16:53 ` [Qemu-devel] [PATCH V5 5/5] block: Add iops_sector_count to do the iops accounting for a given io size Benoît Canet
2013-08-14 9:48 ` Fam Zheng
2013-08-14 18:31 ` Benoît Canet
2013-08-16 12:10 ` Stefan Hajnoczi
2013-08-16 12:14 ` [Qemu-devel] [PATCH V5 0/5] Continuous Leaky Bucket Throttling Stefan Hajnoczi
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=20130814095030.GE11081@localhost.localdomain \
--to=famz@redhat.com \
--cc=benoit@irqsave.net \
--cc=kwolf@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.