[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V6 1/5] throttle: Add a new throttling API imple
From: |
Stefan Hajnoczi |
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 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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/
- [Qemu-devel] [PATCH V6 0/5] Continuous Leaky Bucket Throttling, Benoît Canet, 2013/08/26
- [Qemu-devel] [PATCH V6 1/5] throttle: Add a new t hrottling API implementing continuous leaky bucket., Benoît Canet, 2013/08/26
- Re: [Qemu-devel] [PATCH V6 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH V6 2/5] throttle: Add units t ests, Benoît Canet, 2013/08/26
- [Qemu-devel] [PATCH V6 3/5] block: Enable the new throttling code in the block layer., Benoît Canet, 2013/08/26
- [Qemu-devel] [PATCH V6 4/5] block: Add support fo r throttling burst max in QMP and the command line., Benoît Canet, 2013/08/26
- [Qemu-devel] [PATCH V6 5/5] block: Add iops_siz e to do the iops accounting for a given io size., Benoît Canet, 2013/08/26