qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@nodalink.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org,
	"Benoît Canet" <benoit.canet@nodalink.com>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice
Date: Wed, 24 Sep 2014 13:26:35 +0000	[thread overview]
Message-ID: <20140924132635.GA18369@nodalink.com> (raw)
In-Reply-To: <540DBD46.7030207@redhat.com>

On Mon, Sep 08, 2014 at 04:29:26PM +0200, Paolo Bonzini wrote:
> Il 08/09/2014 14:18, Benoît Canet ha scritto:
> > The algorithm used was defined on the list while discussing the new IO accounting
> > overhaul.
> > See http://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg04954.html
> > 
> > Also the module takes care of computing minimal and maximal values over the time
> > slice duration.
> > 
> > Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
> 
> If you add
> 
> int64_t cpu_get_clock(void)
> {
>     return my_clock_value;
> }
> 
> to the test, and use a QEMU_CLOCK_VIRTUAL-based average, you should be
> able to advance the clock directly in the test with no need for sleep()
> and with 100% deterministic results.

That's a really neat trick. Thanks

  parent reply	other threads:[~2014-09-24 13:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 12:18 [Qemu-devel] [PATCH v2 0/3] Add the infrastructure that will be used to compute I/O accouting averages Benoît Canet
2014-09-08 12:18 ` [Qemu-devel] [PATCH v2 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer Benoît Canet
2014-09-08 14:46   ` Eric Blake
2014-09-15 10:01   ` Markus Armbruster
2014-09-08 12:18 ` [Qemu-devel] [PATCH v2 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse Benoît Canet
2014-09-08 14:56   ` Eric Blake
2014-09-08 12:18 ` [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice Benoît Canet
2014-09-08 14:29   ` Paolo Bonzini
2014-09-08 14:49     ` Benoît Canet
2014-09-08 15:09       ` Paolo Bonzini
2014-09-08 15:25         ` Benoît Canet
2014-09-15 11:13           ` Markus Armbruster
2014-09-15 11:41             ` Benoît Canet
2014-09-15 11:44             ` Benoît Canet
2014-09-24 13:26     ` Benoît Canet [this message]
2014-09-15 10:23   ` Markus Armbruster

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=20140924132635.GA18369@nodalink.com \
    --to=benoit.canet@nodalink.com \
    --cc=pbonzini@redhat.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 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).