ratelimit: don't align wait time with slices
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 7 Feb 2018 07:17:58 +0000 (08:17 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 15 Feb 2018 09:39:49 +0000 (09:39 +0000)
commitb7728f32216f0a7a87bee2f4e009e68b00fd4fb5
tree06bdfc37b12614beba4dc3a48131a55517ccb904
parent00d09fdbbae5f7864ce754913efc84c12fdf9f1a
ratelimit: don't align wait time with slices

It is possible for rate limited writes to keep overshooting a slice's
quota by a tiny amount causing the slice-aligned waiting period to
effectively halve the rate.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 20180207071758.6818-1-w.bumiller@proxmox.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu/ratelimit.h