WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: tsc_scale/cpu_khz imprecise and need fixing?

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: tsc_scale/cpu_khz imprecise and need fixing?
From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Date: Fri, 30 Oct 2009 09:55:14 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 29 Oct 2009 18:56:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <e4ebe3de-a7f2-4c37-8c87-ad96c6c19f85@default>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <e4ebe3de-a7f2-4c37-8c87-ad96c6c19f85@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpY1n6ASbH3OuEFSMSuG2dQI45LkwAKjNfQ
Thread-topic: tsc_scale/cpu_khz imprecise and need fixing?
> 
> Tsc_scale -- and cpu_khz which is tsc_scale/1000 --
> are used in other places as well; one of interest to
> me is in hvm_gtsc_need_scale()... for TSC to work
> properly across certain migrations, this test needs
> to be very precise.   There may be others.

I remembered Keir had raised the same question before.  And the answer is that 
we can't use more precise comparison for the decision considering real 
computing environment. We just use cpu_khz/1000 to determin whether needs TSC 
scaling for migration.  You know, processor vendors shouldn't provides two 
processors whose frequency's difference is less than 1M Hz.  If use more 
precise comparison it may lead to incorrect decision. For example, one 
machine's tsc_khz =2900123, and another one's tsc_kzh 2900124, and I believe 
their real frequencies should be same, and don't need TSC soft scaling when do 
migration between them. But if the unit is khz, we may get an incorrect 
decision due to calibration warp, and lead to unnecessary performance loss. 
That is why we use less precise mHZ as unit than kHZ here.   Make sense ?  :)
Xiantao
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>