All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed
Date: Wed, 24 Oct 2012 17:29:35 -0600	[thread overview]
Message-ID: <508879DF.4050300@redhat.com> (raw)
In-Reply-To: <1351073447-643298-1-git-send-email-dietmar@proxmox.com>

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On 10/24/2012 04:10 AM, Dietmar Maurer wrote:
> 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(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

However, it might also be nice to point to the commit introducing the
bug in the commit message (6ef228fc0de)

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

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 617 bytes --]

  reply	other threads:[~2012-10-24 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 10:10 [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed Dietmar Maurer
2012-10-24 23:29 ` Eric Blake [this message]
2012-11-21 13:24 ` Paolo Bonzini
2012-11-26 16:23   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508879DF.4050300@redhat.com \
    --to=eblake@redhat.com \
    --cc=dietmar@proxmox.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.