qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed
@ 2012-10-24 10:10 Dietmar Maurer
  2012-10-24 23:29 ` Eric Blake
  2012-11-21 13:24 ` Paolo Bonzini
  0 siblings, 2 replies; 4+ messages in thread
From: Dietmar Maurer @ 2012-10-24 10:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Dietmar Maurer

The formula to compute slice_quota was wrong.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
---
 include/qemu/ratelimit.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
index c6ac281..d1610f1 100644
--- 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
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-26 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 10:10 [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed Dietmar Maurer
2012-10-24 23:29 ` Eric Blake
2012-11-21 13:24 ` Paolo Bonzini
2012-11-26 16:23   ` Kevin Wolf

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).