From: Marcelo Tosatti <mtosatti@redhat.com>
To: Fernando Luis Vazquez Cao <fernando_b1@lab.ntt.co.jp>
Cc: "Nadav Har'El" <nyh@math.technion.ac.il>, kvm@vger.kernel.org
Subject: Re: Monotonic clock with KVM pv-clock
Date: Mon, 20 Jan 2014 22:19:45 -0200 [thread overview]
Message-ID: <20140121001945.GA32105@amt.cnet> (raw)
In-Reply-To: <52DD39DB.3040109@lab.ntt.co.jp>
On Mon, Jan 20, 2014 at 11:59:39PM +0900, Fernando Luis Vazquez Cao wrote:
> (2014/01/20 22:33), Marcelo Tosatti wrote:
> >On Mon, Jan 20, 2014 at 11:56:56AM +0200, Nadav Har'El wrote:
> >>If KVM_SYSTEM_TIME is not a correct way to get a monotonic paravirtual clock
> >>from KVM, is there a correct way?
> >Inside a Linux guest? Can use sched_clock().
>
> I would like to mention that Linux guests usually do not use sched_clock()
> directly. The reason being that the kvm_clock based sched_clock() is not
> marked stable (sched_clock_stable is 0), which means that the pair of
> wrappers sched_clock_local()/sched_clock_remote() is used instead.
Should verify the requirements of sched_clock_cpu() and enable
sched_clock_stable in case it fulfills requirements (kvmclock_read can
be nondecreasing due to TSC->nanosecond scaling, and not increase for a
longer duration with global accumulator, due to cmpxchg).
next prev parent reply other threads:[~2014-01-21 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 9:56 Monotonic clock with KVM pv-clock Nadav Har'El
2014-01-20 13:33 ` Marcelo Tosatti
2014-01-20 14:59 ` Fernando Luis Vazquez Cao
2014-01-21 0:19 ` Marcelo Tosatti [this message]
2014-01-21 14:23 ` Fernando Luis Vazquez Cao
2014-01-22 15:41 ` Marcelo Tosatti
2014-01-21 13:24 ` Nadav Har'El
2014-01-21 15:27 ` Marcelo Tosatti
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=20140121001945.GA32105@amt.cnet \
--to=mtosatti@redhat.com \
--cc=fernando_b1@lab.ntt.co.jp \
--cc=kvm@vger.kernel.org \
--cc=nyh@math.technion.ac.il \
/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).