All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] [RFC] time: refactor QEMU timer to use GHRTimer
Date: Tue, 23 Aug 2011 09:43:04 +0200	[thread overview]
Message-ID: <4E535A08.8050706@redhat.com> (raw)
In-Reply-To: <1314040874-9259-2-git-send-email-aliguori@us.ibm.com>

On 08/22/2011 09:21 PM, Anthony Liguori wrote:
> -        ticks = cpu_get_real_ticks();
> -        if (timers_state.cpu_ticks_prev > ticks) {
> -            /* Note: non increasing ticks may happen if the host uses
> -               software suspend */
> -            timers_state.cpu_ticks_offset += timers_state.cpu_ticks_prev - ticks;
> -        }
> +        ticks = get_clock();
>
> [...]
>
> -static inline int64_t cpu_get_real_ticks(void)
> -{
> -    int64_t val;
> -    asm volatile ("rdtsc" : "=A" (val));
> -    return val;
> -}
> -

cpu_get_ticks is used also to emulate the guest TSC, are you sure you 
want to change that uniformly to a 1 GHz rate?

I had some more cleanups in this area, I'll try to get them tested and 
submitted but I have little time for this right now.

Paolo

  parent reply	other threads:[~2011-08-23  7:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 19:21 [Qemu-devel] [PATCH 1/2] main: add high resolution GSource based timer Anthony Liguori
2011-08-22 19:21 ` [Qemu-devel] [PATCH 2/2] [RFC] time: refactor QEMU timer to use GHRTimer Anthony Liguori
2011-08-22 20:28   ` Jan Kiszka
2011-08-22 20:36     ` Anthony Liguori
2011-08-22 20:49       ` Jan Kiszka
2011-08-22 21:55         ` Anthony Liguori
2011-08-22 23:48           ` Jan Kiszka
2011-08-23  8:12     ` Paolo Bonzini
2011-08-23  9:07       ` Edgar E. Iglesias
2011-08-23  7:43   ` Paolo Bonzini [this message]
2011-08-23 12:33     ` Anthony Liguori
2011-08-23 12:44       ` Paolo Bonzini
2011-08-22 19:26 ` [Qemu-devel] [PATCH 1/2] main: add high resolution GSource based timer Anthony Liguori

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=4E535A08.8050706@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=jan.kiszka@siemens.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.