qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Tanase <sebastian.tanase@openwide.fr>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, peter maydell <peter.maydell@linaro.org>,
	aliguori@amazon.com, wenchaoqemu@gmail.com, quintela@redhat.com,
	qemu-devel@nongnu.org, mjt@tls.msk.ru, mst@redhat.com,
	stefanha@redhat.com, armbru@redhat.com, lcapitulino@redhat.com,
	michael@walle.cc, alex@alex.org.uk, crobinso@redhat.com,
	afaerber@suse.de, rth@twiddle.net
Subject: Re: [Qemu-devel] [RFC PATCH V3 0/6] icount: Implement delay algorithm between guest and host clocks
Date: Tue, 1 Jul 2014 17:54:22 +0200 (CEST)	[thread overview]
Message-ID: <1942504343.19196573.1404230062203.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <53B19B80.5060000@redhat.com>



----- Mail original -----
> De: "Paolo Bonzini" <pbonzini@redhat.com>
> À: "Sebastian Tanase" <sebastian.tanase@openwide.fr>, qemu-devel@nongnu.org
> Cc: aliguori@amazon.com, afaerber@suse.de, rth@twiddle.net, "peter maydell" <peter.maydell@linaro.org>,
> michael@walle.cc, alex@alex.org.uk, stefanha@redhat.com, lcapitulino@redhat.com, crobinso@redhat.com,
> armbru@redhat.com, wenchaoqemu@gmail.com, quintela@redhat.com, kwolf@redhat.com, mjt@tls.msk.ru, mst@redhat.com
> Envoyé: Lundi 30 Juin 2014 19:16:48
> Objet: Re: [RFC PATCH V3 0/6] icount: Implement delay algorithm between guest and host clocks
> 
> Il 30/06/2014 15:59, Sebastian Tanase ha scritto:
> > The icount option already implemented in QEMU allows the guest to
> > run at a theoretical
> > frequency of 1/(2^N) GHz (N is the icount parameter). The goal of
> > this patch is to have a
> > real guest frequency close to the one imposed by using the icount
> > option.
> >
> > The main idea behind the algorithm is that we compare the virtual
> > monotonic clock and the
> > host monotonic clock. For big icounts (on our test machine, an i5
> > CPU @ 3.10GHz, icounts
> > starting at 6) the guest clock will be ahead of the host clock. In
> > this case, we try to
> > sleep QEMU for the difference between the 2 clocks. Therefore, the
> > guest would have
> > executed for a period almost equally to the one imposed by icount.
> > We should point out
> > that the algorithm works only for those icounts that allow the
> > guest clock to be in front
> > of the host clock.
> >
> > The first patch adds support for QemuOpts for the 'icount'
> > parameter. It also adds a
> > suboption called 'shift' that will hold the value for 'icount'.
> > Therefore we now have
> > -icount shift=N|auto or -icount N|auto.
> >
> > The second patch adds the 'align' suboption for icount.
> >
> > The third patch exports 'icount_time_shift' so that it can be used
> > in places other than
> > cpus.c; we need it in cpu-exec.c for calculating for how long we
> > want QEMU to sleep.
> >
> > The forth patch implements the algorithm used for calculating the
> > delay we want to sleep.
> > It uses the number of instructions executed by the virtual cpu and
> > also the icount_time_shift.
> >
> > The fifth patch prints to the console whenever the guest clock runs
> > behind the host
> > clock. The fastest printing speed is every 2 seconds, and we only
> > print if the align option
> > is enabled. We also have a limit to 100 printed messages.
> >
> > The sixth patch adds information about the difference between the
> > host and guest clocks
> > (taking into account the offset) in the 'info jit' command. We also
> > print the maximum
> > delay and advance of the guest clock compared to the host clock.
> 
> I think the changes I made are too big to get this in 2.1, but we can
> certainly get this very early in 2.2 instead.  I'll shortly push my
> changes to an "icount" branch at github.com/bonzini/qemu.git.  Can
> you
> look at it and rebase patches 5 and 6 on top (plus the small change I
> asked for in my review of patch 2)?
> 
> Thanks,
> 
> Paolo
> 
> 

Sure, I'll prepare a V4 with all the changes, rebased on your "icount" branch.


Sebastian

  reply	other threads:[~2014-07-01 15:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 13:59 [Qemu-devel] [RFC PATCH V3 0/6] icount: Implement delay algorithm between guest and host clocks Sebastian Tanase
2014-06-30 13:59 ` [Qemu-devel] [RFC PATCH V3 1/6] icount: Add QemuOpts for icount Sebastian Tanase
2014-07-01  8:59   ` Frederic Konrad
2014-06-30 13:59 ` [Qemu-devel] [RFC PATCH V3 2/6] icount: Add align option to icount Sebastian Tanase
2014-06-30 16:33   ` Paolo Bonzini
2014-07-01 15:26     ` Sebastian Tanase
2014-06-30 13:59 ` [Qemu-devel] [RFC PATCH V3 3/6] icount: Make icount_time_shift available everywhere Sebastian Tanase
2014-06-30 13:59 ` [Qemu-devel] [RFC PATCH V3 4/6] cpu_exec: Add sleeping algorithm Sebastian Tanase
2014-06-30 16:46   ` Paolo Bonzini
2014-07-01 15:44     ` Sebastian Tanase
2014-06-30 17:08   ` Paolo Bonzini
2014-06-30 13:59 ` [Qemu-devel] [RFC PATCH V3 5/6] cpu_exec: Print to console if the guest is late Sebastian Tanase
2014-06-30 17:11   ` Paolo Bonzini
2014-07-01 15:52     ` Sebastian Tanase
2014-06-30 13:59 ` [Qemu-devel] [RFC PATCH V3 6/6] monitor: Add drift info to 'info jit' Sebastian Tanase
2014-07-01  7:47   ` Frederic Konrad
2014-07-01 15:55     ` Sebastian Tanase
2014-06-30 17:16 ` [Qemu-devel] [RFC PATCH V3 0/6] icount: Implement delay algorithm between guest and host clocks Paolo Bonzini
2014-07-01 15:54   ` Sebastian Tanase [this message]
2014-07-04 15:36   ` Sebastian Tanase
2014-07-04 15:49     ` Paolo Bonzini
2014-07-04 16:05     ` Michael Tokarev

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=1942504343.19196573.1404230062203.JavaMail.root@openwide.fr \
    --to=sebastian.tanase@openwide.fr \
    --cc=afaerber@suse.de \
    --cc=alex@alex.org.uk \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=crobinso@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=michael@walle.cc \
    --cc=mjt@tls.msk.ru \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=wenchaoqemu@gmail.com \
    /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).