[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/7] throttle: Make LeakyBucket.avg and Leaky
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/7] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types |
Date: |
Tue, 29 Aug 2017 16:29:33 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 08/24/2017 08:24 AM, Alberto Garcia wrote:
> Both the throttling limits set with the throttling.iops-* and
> throttling.bps-* options and their QMP equivalents defined in the
> BlockIOThrottle struct are integer values.
>
> Those limits are also reported in the BlockDeviceInfo struct and they
> are integers there as well.
>
> Therefore there's no reason to store them internally as double and do
> the conversion everytime we're setting or querying them, so this patch
> uses uint64_t for those types. Let's also use an unsigned type because
> we don't allow negative values anyway.
>
> LeakyBucket.level and LeakyBucket.burst_level do however remain double
> because their value changes depending on the fraction of time elapsed
> since the previous I/O operation.
>
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
> include/qemu/throttle.h | 4 ++--
> tests/test-throttle.c | 3 ++-
> util/throttle.c | 7 +++----
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/7] Misc throttle fixes, Alberto Garcia, 2017/08/24
- [Qemu-devel] [PATCH v2 1/7] throttle: Fix wrong variable name in the header documentation, Alberto Garcia, 2017/08/24
- [Qemu-devel] [PATCH v2 7/7] throttle: Test the valid range of config values, Alberto Garcia, 2017/08/24
- [Qemu-devel] [PATCH v2 3/7] throttle: Make throttle_is_valid() a bit less verbose, Alberto Garcia, 2017/08/24
- [Qemu-devel] [PATCH v2 4/7] throttle: Remove throttle_fix_bucket() / throttle_unfix_bucket(), Alberto Garcia, 2017/08/24
- [Qemu-devel] [PATCH v2 5/7] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types, Alberto Garcia, 2017/08/24
- Re: [Qemu-devel] [PATCH v2 5/7] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types,
Eric Blake <=
- [Qemu-devel] [PATCH v2 2/7] throttle: Update the throttle_fix_bucket() documentation, Alberto Garcia, 2017/08/24
- [Qemu-devel] [PATCH v2 6/7] throttle: Make burst_length 64bit and add range checks, Alberto Garcia, 2017/08/24
- Re: [Qemu-devel] [PATCH v2 0/7] Misc throttle fixes, Stefan Hajnoczi, 2017/08/29