From: Paolo Bonzini <pbonzini@redhat.com>
To: "Benoît Canet" <benoit.canet@nodalink.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse
Date: Wed, 24 Sep 2014 17:33:25 +0200 [thread overview]
Message-ID: <5422E445.5000706@redhat.com> (raw)
In-Reply-To: <1411572065-18072-3-git-send-email-benoit.canet@nodalink.com>
Il 24/09/2014 17:21, Benoît Canet ha scritto:
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
> ---
> include/qemu/throttle.h | 2 --
> include/qemu/timer.h | 2 ++
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
> index 8f9e611..1c639d2 100644
> --- a/include/qemu/throttle.h
> +++ b/include/qemu/throttle.h
> @@ -27,8 +27,6 @@
> #include "qemu-common.h"
> #include "qemu/timer.h"
>
> -#define NANOSECONDS_PER_SECOND 1000000000
> -
> typedef enum {
> THROTTLE_BPS_TOTAL,
> THROTTLE_BPS_READ,
> diff --git a/include/qemu/timer.h b/include/qemu/timer.h
> index 5f5210d..0884e72 100644
> --- a/include/qemu/timer.h
> +++ b/include/qemu/timer.h
> @@ -5,6 +5,8 @@
> #include "qemu-common.h"
> #include "qemu/notify.h"
>
> +#define NANOSECONDS_PER_SECOND 1000000000
> +
> /* timers */
>
> #define SCALE_MS 1000000
>
Went through all uses, for the two that matter:
util/throttle.c: leak = (bkt->avg * (double) delta_ns) / NANOSECONDS_PER_SECOND;
util/throttle.c: double wait = extra * NANOSECONDS_PER_SECOND;
the other operand is already double.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
next prev parent reply other threads:[~2014-09-24 15:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 15:21 [Qemu-devel] [PATCH v3 0/3] timed average infrastructure for use in block statistics Benoît Canet
2014-09-24 15:21 ` [Qemu-devel] [PATCH v3 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer Benoît Canet
2014-09-24 16:33 ` Eric Blake
2014-09-24 15:21 ` [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse Benoît Canet
2014-09-24 15:33 ` Paolo Bonzini [this message]
2014-09-24 15:33 ` Paolo Bonzini
2014-09-29 16:04 ` Benoît Canet
2014-09-29 21:54 ` Paolo Bonzini
2014-09-29 23:08 ` Benoît Canet
2014-09-24 15:21 ` [Qemu-devel] [PATCH v3 3/3] util: Infrastructure for computing recent averages Benoît Canet
2014-10-13 12:05 ` Paolo Bonzini
2014-10-13 15:06 ` Benoît Canet
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=5422E445.5000706@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=benoit.canet@nodalink.com \
--cc=peter.maydell@linaro.org \
--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.