All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dan Magenheimer" <dan.magenheimer@oracle.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: RE: System time monotonicity
Date: Tue, 8 Apr 2008 19:55:04 -0600	[thread overview]
Message-ID: <20080408195504234.00000004064@djm-pc> (raw)
In-Reply-To: <D470B4E54465E3469E2ABBC5AFAC390F024D9192@pdsmsx412.ccr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

> >But I also observe that all of the hvm platform timer (pit,
> >hpet, and pmtimer) code is built on top of the physical TSC
> >plus the vmx/svm tsc_offset which doesn't seem to be affected
> >by the Xen TSC synchronization.  True?
>
> For cpus on same system bus driven by one crystal, TSC drift among
> cpus may be just dozen of cycles after boot time sync, which is
> negligible enough compared to migration overhead and thus
> it's unlikely
> to have HVM guest to observe a non-monotonic behavior after resume.

I agree this case is not much of a problem.

> The issue comes with cpus running on different frequency, like driven
> by multiple crystals or on-demand frequency change which affects TSC
> too. HVM guest can be configured to avoid migrating among cpus with
> different TSC freq, like limiting its cpu affinity to cpus on
> same system bus.

These are the cases I am worried about.  The linux kernel seems
to have a number of cases that mark TSC as unstable, but
Xen does not, nor (I think) does Xen expose this information
anywhere.  So it seems SMP guests need to be pinned to physical
CPUs that are measured to have sync'ed TSC's to guarantee that
the (virtual) platform timer is monotonic.

> Or you have to configure HVM guest to not trust TSC...

Yes, that's what I'm thinking... like Linux, Xen could/should
build virtual platform timers on a physical clocksource other
than tsc if all of the potential vcpu->pcpu mappings are not
on sync'd-TSC-pcpus.

I assume this problem is worse with multi-socket Hypertransport
and future Intel QPI boxes?  Or is TSC (and frequency changing)
synchronized for such systems?

Thanks,
Dan

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2008-04-09  1:55 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-08 16:34 System time monotonicity Dan Magenheimer
2008-04-08 16:42 ` Keir Fraser
2008-04-08 17:39   ` Dan Magenheimer
2008-04-09  1:16     ` Tian, Kevin
2008-04-09  1:55       ` Dan Magenheimer [this message]
2008-04-09  3:20         ` Tian, Kevin
2008-04-09 12:42         ` Ian Pratt
2008-04-09 14:25           ` Dan Magenheimer
2008-04-09 14:41             ` Keir Fraser
2008-04-09 16:33               ` Dan Magenheimer
2008-04-09 16:40                 ` Keir Fraser
2008-04-09 18:36                   ` Dan Magenheimer
2008-04-10  7:08                     ` Keir Fraser
2008-04-10 21:27                       ` Dan Magenheimer
2008-04-11  6:48                         ` Keir Fraser
2008-04-11 22:05                           ` Dan Magenheimer
     [not found] <47FFC37A.4060402@virtualiron.com>
2008-04-11 21:20 ` Keir Fraser
2008-04-11 21:41   ` Keir Fraser
2008-04-11 22:58     ` Dave Winchell
2008-04-12  7:09       ` Keir Fraser
2008-04-21 19:26         ` Dan Magenheimer
2008-04-21 19:31           ` Keir Fraser
2008-04-11 22:22   ` Dan Magenheimer
  -- strict thread matches above, loose matches on Subject: below --
2007-04-03 17:51 Ian Pratt
2007-04-03 14:36 Ian Pratt
2007-04-03 14:57 ` John Levon
2007-03-26 18:23 John Levon
2007-03-26 18:47 ` Keir Fraser
2007-03-26 20:04   ` John Levon
2007-03-27 10:47     ` Keir Fraser
2007-04-03 14:03     ` John Levon
2007-03-26 18:50 ` Ian Pratt
2007-03-26 18:59   ` Keir Fraser
2007-03-26 20:14     ` John Levon
2007-03-26 21:55       ` Ian Pratt
2007-03-27  0:27       ` Keir Fraser

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=20080408195504234.00000004064@djm-pc \
    --to=dan.magenheimer@oracle.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xensource.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 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.