Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2018 08:32:44 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andriy Gapon <avg@FreeBSD.org>, FreeBSD Current <freebsd-current@FreeBSD.org>
Subject:   Re: TSC calibration in virtual machines
Message-ID:  <729d4477-3c68-e3db-2ebc-0bd4deba61cd@FreeBSD.org>
In-Reply-To: <8ac353c5-d188-f432-aab1-86f4ca5fd295@FreeBSD.org>
References:  <8ac353c5-d188-f432-aab1-86f4ca5fd295@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/27/18 12:14 AM, Andriy Gapon wrote:
> 
> It seems that TSC calibration in virtual machines sometimes can do more harm
> than good.  Should we default to trusting the information provided by a hypervisor?
> 
> Specifically, I am observing a problem on GCE instances where calibrated TSC
> frequency is about 10% lower than advertised frequency.  And apparently the
> advertised frequency is the right one.
> 
> I found this thread with similar reports and a variety of workarounds from
> administratively disabling the calibration to switching to a different timecounter:
> https://lists.freebsd.org/pipermail/freebsd-cloud/2017-January/000080.html

I suspect you are probably right that we should just "trust" TSC frequencies
provided by a hypervisor.  We could perhaps choose to whitelist hypervisors
known to provide accurate values if we wanted to be cautious.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?729d4477-3c68-e3db-2ebc-0bd4deba61cd>