xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Joao Martins <joao.m.martins@oracle.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Joao Martins <joao.m.martins@oracle.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH v4 0/5] x86/time: PVCLOCK_TSC_STABLE_BIT support
Date: Wed, 14 Sep 2016 18:37:45 +0100	[thread overview]
Message-ID: <1473874670-4986-1-git-send-email-joao.m.martins@oracle.com> (raw)

Hey,

This is v4 on the pvclock TSC series addressing comments from previous
version, see individual patches for complete changelog.

This series is divided as follows:

 R      * Patch 1: Small refactor around init_platform_time to reuse
                   initialization code when switching to TSC.
 U      * Patch 2: Adds a new clocksource based on TSC
 U      * Patch 3: Prerequisite for patch 4
 U      * Patch 4: Implements the PVCLOCK_TSC_STABLE_BIT
 N      * Patch 5: Extend "tsc" param to relax monotonicity restriction
                   across sockets.

 [ R := Reviewed-by ;; U := Updated ;; N := New ]

The benefit of this series is two-fold:
 
 1. Provide the guarantee of monotonic results on xen own system time as seen
 by any cpu when using TSC as clocksource.

 2. Provide this same guarantee to guests and thus set the
 TSC_STABLE_BIT (both FreeBSD and Linux support it) which then allows guests to
 skip expensive monotonicity check between PV CPU time infos. Plus, on Linux
 specifically this also means that it could support vDSO which greatly increases
 performance (x10) for gettimeofday and clock_gettime since it would no
 longer need to do the system call to get a reliable snapshot of system time.
 For a reference on my laptop the speed of gettimeofday under xen pvclock is 
 ~2 Mops/sec (Million ops per sec) whereas with vDSO it's on the range
 of ~22 Mops/sec on <= 4.4 kernels and ~37 Mops on >= 4.5.
 
 Doing a long running time warp test for 2 weeks on a dual-socket Haswell
 machine and I haven't yet seen time going backwards (plus tests on older
 multi socket machines). Furthermore double checked migration to/from hosts
 with/without the bit while guest was running the time warp test and no issues
 occurred too.

Thanks!

Joao Martins (5):
  x86/time: refactor init_platform_time()
  x86/time: implement tsc as clocksource
  x86/time: refactor read_platform_stime()
  x86/time: implement PVCLOCK_TSC_STABLE_BIT
  x86/time: extend "tsc" param with "stable:socket"

 docs/misc/xen-command-line.markdown |  10 +-
 xen/arch/x86/platform_hypercall.c   |   3 +-
 xen/arch/x86/time.c                 | 226 +++++++++++++++++++++++++++++++-----
 xen/include/asm-x86/time.h          |   1 +
 4 files changed, 206 insertions(+), 34 deletions(-)

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

             reply	other threads:[~2016-09-14 17:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 17:37 Joao Martins [this message]
2016-09-14 17:37 ` [PATCH v4 1/5] x86/time: refactor init_platform_time() Joao Martins
2016-09-14 17:37 ` [PATCH v4 2/5] x86/time: implement tsc as clocksource Joao Martins
2016-09-19 10:13   ` Jan Beulich
2016-09-19 16:11     ` Joao Martins
2016-09-19 16:25       ` Jan Beulich
2016-09-19 17:54         ` Joao Martins
2016-09-20  7:13           ` Jan Beulich
2016-09-20 10:15             ` Joao Martins
2016-09-20 10:23               ` Joao Martins
2016-09-20 13:55               ` Jan Beulich
2016-09-20 16:17                 ` Joao Martins
2016-09-21  9:14                   ` Joao Martins
2016-09-21  9:20                   ` Joao Martins
2016-09-21  9:45                     ` Jan Beulich
2016-09-21 13:30                       ` Joao Martins
2016-09-14 17:37 ` [PATCH v4 3/5] x86/time: refactor read_platform_stime() Joao Martins
2016-09-19 10:15   ` Jan Beulich
2016-09-19 16:11     ` Joao Martins
2016-09-14 17:37 ` [PATCH v4 4/5] x86/time: implement PVCLOCK_TSC_STABLE_BIT Joao Martins
2016-09-19 10:22   ` Jan Beulich
2016-09-19 16:11     ` Joao Martins
2016-09-14 17:37 ` [PATCH v4 5/5] x86/time: extend "tsc" param with "stable:socket" Joao Martins
2016-09-19 10:29   ` Jan Beulich
2016-09-19 16:11     ` Joao Martins

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=1473874670-4986-1-git-send-email-joao.m.martins@oracle.com \
    --to=joao.m.martins@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xenproject.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).