From: Keir Fraser Subject: Re: Xen cpufreq support status: how to notify hypervisor of frequency change? Date: Wed, 12 Apr 2006 06:47:35 +0100 Message-ID: <367ff4cc58e23ff395b7944b7b28b35b@cl.cam.ac.uk> References: <200604081829.00179.yourst@yourst.com> <200604102005.38814.yourst@yourst.com> <200604111611.42604.yourst@yourst.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200604111611.42604.yourst@yourst.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Matt T. Yourst" Cc: yourst@cs.binghamton.edu, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 11 Apr 2006, at 21:11, Matt T. Yourst wrote: > I'm still getting some issues with the timer not properly re-syncing > even > though the cpufreq driver makes the new setcpufreq hypercall, which Xen > properly receives. > > Right now it just sets cpu_khz and calls local_time_calibration() on > the > target CPU(s). Is there something else we need to do, like calling the > equivalent of early_time_init() or init_xen_time() all over again? > > The problem is much less severe now but it still sometimes happens. local_time_calibration() won't really do the right thing. It will calibrate for the observed TSC rate over the last few seconds, most of which will have passed at the old TSC rate. The simplest fix would simply be to multiply the calculated TSC scale factor by new_mhz/old_mhz. -- Keir