projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c6f08b
)
stream: fix ratelimit_set_speed
author
Dietmar Maurer
<dietmar@proxmox.com>
Wed, 24 Oct 2012 10:10:47 +0000
(12:10 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Fri, 30 Nov 2012 10:33:24 +0000
(11:33 +0100)
The formula to compute slice_quota was wrong since commit
6ef228fc
.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/qemu/ratelimit.h
patch
|
blob
|
history
diff --git
a/include/qemu/ratelimit.h
b/include/qemu/ratelimit.h
index
c6ac281
..
d1610f1
100644
(file)
--- a/
include/qemu/ratelimit.h
+++ b/
include/qemu/ratelimit.h
@@
-42,7
+42,7
@@
static inline void ratelimit_set_speed(RateLimit *limit, uint64_t speed,
uint64_t slice_ns)
{
limit->slice_ns = slice_ns;
- limit->slice_quota = ((double)speed *
1000000000ULL) / slice_ns
;
+ limit->slice_quota = ((double)speed *
slice_ns)/1000000000ULL
;
}
#endif