From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Cohen <avi.cohen@huawei.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: KVM-Clock
Date: Wed, 24 Feb 2016 15:08:32 -0300 [thread overview]
Message-ID: <20160224180830.GA8759@amt.cnet> (raw)
In-Reply-To: <B84047ECBD981D4B93EAE5A6245AA36199618E@lhreml501-mbb>
On Wed, Feb 24, 2016 at 03:27:45PM +0000, Avi Cohen wrote:
>
>
> >Subtracting tsc_offset later is easier.
>
> >> In guest : rx_time = tsc_to_ns * rdtsc()
> >> Delay = rx_time - tx_time
> >>
> >> How to enable kvm_write_tsc_offset ?
>
> ># echo kvm_write_tsc_offset > /sys/kernel/debug/tracing/set_event
>
> >Then boot guest
>
> >Then cat /sys/kernel/debug/tracing/trace
>
> OK - I did it and it is indeed accurate. But this will not solve my problem, because I need the host realtime clock in my guest and not the host-TSC
Configure NTP to synchronize from host NTPd server. How close the host
and guest clocks can be synchronized depends on how reliable is the
transmission of data between guest and host.
Then use the guest/host TSCs to measure how accurate the clocks are.
> In my application VMa in HOSTa is sending a 1-way delay measurement packet to VMb in HOSTb.
> I'm perfectly synching the 2 hosts with PTP.
> I need that the 2 guests's clocks will be synched to their hosts i.e. VMa/VMb is sync to HOSTa/HOSTb accordingly
Chronyd in the guest should work, syncing from NTPd server in the host
(haven't configured that setup myself, about to do so soon).
prev parent reply other threads:[~2016-02-24 18:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B84047ECBD981D4B93EAE5A6245AA361995B00@lhreml501-mbb>
2016-02-21 16:57 ` KVM-Clock Avi Cohen
2016-02-22 20:08 ` KVM-Clock Radim Krčmář
2016-02-23 7:11 ` KVM-Clock Avi Cohen
2016-02-23 8:04 ` KVM-Clock Wanpeng Li
2016-02-23 8:18 ` KVM-Clock Avi Cohen
2016-02-23 8:38 ` KVM-Clock Avi Cohen
2016-02-23 17:51 ` KVM-Clock Radim Krčmář
2016-02-24 10:32 ` KVM-Clock Avi Cohen
2016-02-24 12:20 ` KVM-Clock Radim Krčmář
2016-02-24 15:31 ` KVM-Clock Avi Cohen
2016-02-24 4:09 ` KVM-Clock Marcelo Tosatti
2016-02-24 8:15 ` KVM-Clock Avi Cohen
2016-02-24 11:33 ` KVM-Clock Marcelo Tosatti
2016-02-24 11:51 ` KVM-Clock Avi Cohen
2016-02-24 12:23 ` KVM-Clock Marcelo Tosatti
2016-02-24 15:27 ` KVM-Clock Avi Cohen
2016-02-24 18:08 ` Marcelo Tosatti [this message]
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=20160224180830.GA8759@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi.cohen@huawei.com \
--cc=kvm@vger.kernel.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).