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, mst@redhat.com, stefanha@redhat.com,
	armbru@redhat.com, lcapitulino@redhat.com, michael@walle.cc,
	camille begue <camille.begue@openwide.fr>,
	alex@alex.org.uk, crobinso@redhat.com, afaerber@suse.de,
	rth@twiddle.net
Subject: Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks
Date: Tue, 22 Jul 2014 16:02:41 +0200 (CEST)	[thread overview]
Message-ID: <47507527.20044186.1406037761337.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <53C67C00.5000203@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, mst@redhat.com, "camille begue"
> <camille.begue@openwide.fr>
> Envoyé: Mercredi 16 Juillet 2014 15:20:00
> Objet: Re: [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks
> 
> Il 16/07/2014 14:18, Sebastian Tanase ha scritto:
> > v3 -> v4
> >
> > * Add better error handling for 'strtol' in patch 2
> > * Add 'Sleep' instead of 'nanosleep' for Windows hosts in patch 4
> > * Remove function pointers from patches 4 and 5
> 
> Hi Sebastian, I think we're getting really close.
> 
> I asked a question about clocks_offset; I think it's not necessary to
> compute it in cpu-exec.c because the same information is available
> elsewhere.  It is also probably not necessary to make it public.  Can
> you please check this?  Once this is sorted out, the patch should be
> ready for inclusion in 2.2.
> 
> Thanks for your effort!
> 
> Paolo
> 

Hello,

Supposing the patch that changes vm_clock_warp_start from 0 to -1 is accepted,
I could use the information in timers_state.cpu_clock_offset instead of recalculating
the offset. Besides, given that I only need this particular field from the whole 
structure, I think I don't have to make timers_state public; I could add a function 
in cpus.c, for example:

    int64_t cpu_get_clock_offset(void)
    {
        int64_t ti;
        unsigned start;

        do {
            start = seqlock_read_begin(&timers_state.vm_clock_seqlock);
            ti = -timers_state.cpu_clock_offset;
        } while (seqlock_read_retry(&timers_state.vm_clock_seqlock, start));

        return ti;
    }

that will return the cpu_clock_offset field.


Best regards,

Sebastian

  reply	other threads:[~2014-07-22 14:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 12:18 [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks Sebastian Tanase
2014-07-16 12:18 ` [Qemu-devel] [RFC PATCH V4 1/6] icount: Add QemuOpts for icount Sebastian Tanase
2014-07-16 12:18 ` [Qemu-devel] [RFC PATCH V4 2/6] icount: Add align option to icount Sebastian Tanase
2014-07-16 12:18 ` [Qemu-devel] [RFC PATCH V4 3/6] icount: Make icount_time_shift available everywhere Sebastian Tanase
2014-07-16 12:18 ` [Qemu-devel] [RFC PATCH V4 4/6] cpu_exec: Add sleeping algorithm Sebastian Tanase
2014-07-16 12:18 ` [Qemu-devel] [RFC PATCH V4 5/6] cpu_exec: Print to console if the guest is late Sebastian Tanase
2014-07-16 12:18 ` [Qemu-devel] [RFC PATCH V4 6/6] monitor: Add drift info to 'info jit' Sebastian Tanase
2014-07-16 13:18   ` Paolo Bonzini
2014-07-22  9:58     ` Sebastian Tanase
2014-07-22 10:19       ` Paolo Bonzini
2014-07-22 13:55         ` Sebastian Tanase
2014-07-16 13:20 ` [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks Paolo Bonzini
2014-07-22 14:02   ` Sebastian Tanase [this message]
2014-07-22 14:59     ` Paolo Bonzini
2014-07-22 15:17       ` Sebastian Tanase
2014-07-22 15:22         ` Paolo Bonzini
2014-07-22 15:28           ` Sebastian Tanase
2014-07-22 15:44             ` Paolo Bonzini
2014-07-16 13:40 ` Luiz Capitulino

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=47507527.20044186.1406037761337.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=camille.begue@openwide.fr \
    --cc=crobinso@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=michael@walle.cc \
    --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).