From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbAI0-0007HG-9T for qemu-devel@nongnu.org; Wed, 21 Nov 2012 08:24:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbAHu-0001Kp-7i for qemu-devel@nongnu.org; Wed, 21 Nov 2012 08:24:28 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:58865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbAHu-0001KW-2H for qemu-devel@nongnu.org; Wed, 21 Nov 2012 08:24:22 -0500 Received: by mail-ie0-f173.google.com with SMTP id e13so166415iej.4 for ; Wed, 21 Nov 2012 05:24:21 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50ACD600.9020102@redhat.com> Date: Wed, 21 Nov 2012 14:24:16 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1351073447-643298-1-git-send-email-dietmar@proxmox.com> In-Reply-To: <1351073447-643298-1-git-send-email-dietmar@proxmox.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Dietmar Maurer , qemu-devel@nongnu.org Il 24/10/2012 12:10, Dietmar Maurer ha scritto: > The formula to compute slice_quota was wrong. > > Signed-off-by: Dietmar Maurer > --- > 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 > Ping... Stefan, can you commit this fix to block branch too? Paolo