All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dan Magenheimer" <dan.magenheimer@oracle.com>
To: Nils Nieuwejaar <nils.nieuwejaar@gmail.com>,
	John Levon <levon@movementarian.org>
Cc: Ian Pratt <Ian.Pratt@eu.citrix.com>,
	"Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>,
	Dave Winchell <dwinchell@virtualiron.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: RE: RE: [PATCH] rendezvous-based local time calibration WOW!
Date: Sat, 9 Aug 2008 14:55:33 -0600	[thread overview]
Message-ID: <20080809145533500.00000008444@djm-pc> (raw)
In-Reply-To: <9ab51d7e0808090747l4fde8e87ga368e7ae62f07de0@mail.gmail.com>

> On Wed, Aug 6, 2008 at 11:21 AM, John Levon 
> <levon@movementarian.org> wrote:
> > On Wed, Aug 06, 2008 at 09:09:06AM -0600, Dan Magenheimer wrote:
> >
> >> Again no guarantees but I think we are now under the magic
> >> threshold where the skew is smaller than the time required
> >> for scheduling a VCPU onto a different CPU.  If so,
> >> consecutive gethrtime's by the same thread in a domain
> >> should always be monotonic.
> >
> > Right! That sounds positive.
> 
> It's an improvement, but I'm pretty sure it's still not sufficient for
> Solaris.  If I understand the change correctly, it seems to solve the
> problem for single-vcpu guests on an SMP,  but not for multi-vcpu
> guests on an SMP.  It sounds like the OS could reschedule a thread
> from VCPU 0 to VCPU 1 and consecutive calls to gethrtime() could still
> return non-monotonic results.

How long does it take for Solaris to reschedule a thread from
VCPU0 to VCPU1?  Its certainly not zero time (and you also need
to add the overhead of gethrtime).

But, yes, the same "no guarantees" applies to this situation...
if a Solaris thread continuously calls gethrtime(), there is a
non-zero probability that, if the thread changes physical CPUs
and the thread rescheduling code is "very fast",
two consecutive calls could observe time going backwards.  But
that's true with much recent vintage hardware because TSCs
sometimes skew, and so most OS's with high-res timers are able
to deal with this.

True of Solaris, John?

Dan

  reply	other threads:[~2008-08-09 20:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03 16:50 [PATCH] rendezvous-based local time calibration WOW! Dan Magenheimer
2008-08-03 17:24 ` Keir Fraser
2008-08-04 15:24   ` Dan Magenheimer
2008-08-04 15:36     ` Keir Fraser
2008-08-04 17:10     ` Keir Fraser
2008-08-04 17:37       ` Dan Magenheimer
2008-08-04 19:40         ` Dan Magenheimer
2008-08-04 19:47           ` Keir Fraser
2008-08-05 18:56           ` John Levon
2008-08-05 20:49             ` Dan Magenheimer
2008-08-05 21:12               ` John Levon
2008-08-05 21:27                 ` Dan Magenheimer
2008-08-05 21:43                   ` Keir Fraser
2008-08-06 13:25                 ` Dan Magenheimer
2008-08-06 13:38                   ` John Levon
2008-08-06 15:09                     ` Dan Magenheimer
2008-08-06 15:21                       ` John Levon
2008-08-06 15:34                         ` Dan Magenheimer
2008-08-09 14:47                         ` Nils Nieuwejaar
2008-08-09 20:55                           ` Dan Magenheimer [this message]
2008-08-11 14:37                             ` John Levon
2008-08-11 14:38                               ` Keir Fraser
2008-08-11 14:43                                 ` John Levon
2008-08-11 14:46                                   ` Keir Fraser
2008-08-11 14:49                                     ` John Levon
2008-08-11 14:50                                       ` Keir Fraser
2008-08-11 18:41                                         ` John Levon

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=20080809145533500.00000008444@djm-pc \
    --to=dan.magenheimer@oracle.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=dwinchell@virtualiron.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=levon@movementarian.org \
    --cc=nils.nieuwejaar@gmail.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.