[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/time: use correct (local) time stamp in constant-TSC calibration fast path
commit b64438c7c1495a7580d1bb9d8ba644f3705e1ffb Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Jun 14 15:08:47 2016 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jun 14 15:08:47 2016 +0200 x86/time: use correct (local) time stamp in constant-TSC calibration fast path This looks like a copy and paste mistake in commit 1b6a99892d ("x86: Simpler time handling when TSC is constant across all power saving states"), responsible for occasional many-microsecond cross-CPU skew of what NOW() returns. Also improve the correlation between local TSC and stime stamps obtained at the end of the two calibration handlers: Compute the stime one from the TSC one, instead of doing another rdtsc() for that compuation. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 3928a5f..9707e76 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -998,7 +998,7 @@ static void local_time_calibration(void) /* Atomically read cpu_calibration struct and write cpu_time struct. */ local_irq_disable(); t->local_tsc_stamp = c->local_tsc_stamp; - t->stime_local_stamp = c->stime_master_stamp; + t->stime_local_stamp = c->stime_local_stamp; t->stime_master_stamp = c->stime_master_stamp; local_irq_enable(); update_vcpu_system_time(current); @@ -1275,7 +1275,7 @@ static void time_calibration_tsc_rendezvous(void *_r) } c->local_tsc_stamp = rdtsc(); - c->stime_local_stamp = get_s_time(); + c->stime_local_stamp = get_s_time_fixed(c->local_tsc_stamp); c->stime_master_stamp = r->master_stime; raise_softirq(TIME_CALIBRATE_SOFTIRQ); @@ -1305,7 +1305,7 @@ static void time_calibration_std_rendezvous(void *_r) } c->local_tsc_stamp = rdtsc(); - c->stime_local_stamp = get_s_time(); + c->stime_local_stamp = get_s_time_fixed(c->local_tsc_stamp); c->stime_master_stamp = r->master_stime; raise_softirq(TIME_CALIBRATE_SOFTIRQ); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |