qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] raltelimit bug
@ 2012-10-24  8:56 Dietmar Maurer
  2012-10-24  9:28 ` Paolo Bonzini
  2012-10-24 23:24 ` Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: Dietmar Maurer @ 2012-10-24  8:56 UTC (permalink / raw)
  To: pbonzini@redhat.com, qemu-devel@nongnu.org

The code to compute slice_quota seems buggy. The following fixes the issue:

--- new.orig/include/qemu/ratelimit.h   2012-10-22 07:06:31.000000000 +0200
+++ new/include/qemu/ratelimit.h        2012-10-22 07:06:49.000000000 +0200
@@ -42,7 +42,7 @@
                                        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

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

end of thread, other threads:[~2012-10-24 23:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24  8:56 [Qemu-devel] raltelimit bug Dietmar Maurer
2012-10-24  9:28 ` Paolo Bonzini
2012-10-24 23:24 ` Eric Blake

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