From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2 1/6] x86/time: calibrate TSC against platform timer Date: Wed, 3 Aug 2016 14:07:15 +0100 Message-ID: References: <57A205C50200007800102378@prv-mh.provo.novell.com> <57A206FA0200007800102389@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6397642139788633053==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUvtI-0005gc-Cz for xen-devel@lists.xenproject.org; Wed, 03 Aug 2016 13:07:20 +0000 In-Reply-To: <57A206FA0200007800102389@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org --===============6397642139788633053== Content-Type: multipart/alternative; boundary="------------3DE249B1B10AC625C383711A" --------------3DE249B1B10AC625C383711A Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 03/08/16 14:00, Jan Beulich wrote: > ... instead of unconditionally against the PIT. This allows for local > and master system times to remain in better sync (which matters even > when, on any modern system, the master time is really used only during > secondary CPU bringup, as the error between the two is in fact > noticable in cross-CPU NOW() invocation monotonicity). > > This involves moving the init_platform_timer() invocation into > early_time_init(), splitting out the few things which really need to be > done in init_xen_time(). That in turn allows dropping the open coded > PIT initialization from init_IRQ() (it was needed for APIC clock > calibration, which runs between early_time_init() and init_xen_time()). > > In the course of this re-ordering also set the timer channel 2 gate low > after having finished calibration. This should be benign to overall > system operation, but appears to be the more clean state. > > Also do away with open coded 8254 register manipulation from 8259 code. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --------------3DE249B1B10AC625C383711A Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 7bit
On 03/08/16 14:00, Jan Beulich wrote:
... instead of unconditionally against the PIT. This allows for local
and master system times to remain in better sync (which matters even
when, on any modern system, the master time is really used only during
secondary CPU bringup, as the error between the two is in fact
noticable in cross-CPU NOW() invocation monotonicity).

This involves moving the init_platform_timer() invocation into
early_time_init(), splitting out the few things which really need to be
done in init_xen_time(). That in turn allows dropping the open coded
PIT initialization from init_IRQ() (it was needed for APIC clock
calibration, which runs between early_time_init() and init_xen_time()).

In the course of this re-ordering also set the timer channel 2 gate low
after having finished calibration. This should be benign to overall
system operation, but appears to be the more clean state.

Also do away with open coded 8254 register manipulation from 8259 code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
--------------3DE249B1B10AC625C383711A-- --===============6397642139788633053== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6397642139788633053==--