From: Stefan Hajnoczi <stefanha@gmail.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 V6 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.
Date: Wed, 28 Aug 2013 16:07:42 +0200 [thread overview]
Message-ID: <20130828140742.GD12214@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1377528172-11137-2-git-send-email-benoit@irqsave.net>
On Mon, Aug 26, 2013 at 04:42:48PM +0200, Benoît Canet wrote:
> +/* fix bucket parameters */
> +static void throttle_fix_bucket(LeakyBucket *bkt)
> +{
> + double min;
> +
> + /* zero bucket level */
> + bkt->level = 0;
> +
> + /* The following is done to cope with the cfg block scheduler which regroup
s/cfg/Linux CFQ/ ?
> +/* used to get config
> + *
> + * @ts: the throttle state we are working on
> + * @ret: the config
> + */
> +ThrottleConfig *throttle_get_config(ThrottleState *ts)
> +{
> + return &ts->cfg;
> +}
throttle_config() copies the ThrottleConfig struct but this returns a
non-const pointer to it. Should this function copy it too?
void throttle_get_config(ThrottleState *ts, ThrottleConfig *cfg)
{
*cfg = ts->cfg;
}
> +/* do the accounting for this operation
> + *
> + * @is_write: the type of operation (read/write)
> + * size: the size of the operation
s/size/@size/
> + */
> +void throttle_account(ThrottleState *ts, bool is_write, uint64_t size)
> +{
> + double units = 1.0;
> +
> + /* if cfg.op_size is not defined we will acccount exactly 1 operation */
s/acccount/account/
next prev parent reply other threads:[~2013-08-28 14:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 14:42 [Qemu-devel] [PATCH V6 0/5] Continuous Leaky Bucket Throttling Benoît Canet
2013-08-26 14:42 ` [Qemu-devel] [PATCH V6 1/5] throttle: Add a new throttling API implementing continuous leaky bucket Benoît Canet
2013-08-28 14:07 ` Stefan Hajnoczi [this message]
2013-08-26 14:42 ` [Qemu-devel] [PATCH V6 2/5] throttle: Add units tests Benoît Canet
2013-08-26 14:42 ` [Qemu-devel] [PATCH V6 3/5] block: Enable the new throttling code in the block layer Benoît Canet
2013-08-28 14:21 ` Stefan Hajnoczi
2013-08-26 14:42 ` [Qemu-devel] [PATCH V6 4/5] block: Add support for throttling burst max in QMP and the command line Benoît Canet
2013-08-28 14:24 ` Stefan Hajnoczi
2013-08-28 14:49 ` Benoît Canet
2013-08-26 14:42 ` [Qemu-devel] [PATCH V6 5/5] block: Add iops_size to do the iops accounting for a given io size Benoît Canet
2013-08-28 14:27 ` 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=20130828140742.GD12214@stefanha-thinkpad.muc.redhat.com \
--to=stefanha@gmail.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 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).