[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] RE: 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.