Re: [PATCH v2: kvm 2/4] Kill the confusing tsc_ref_khz and ref_freq variables.

2009-09-29 Thread Avi Kivity
On 09/29/2009 06:04 AM, Zachary Amsden wrote: They are globals, not clearly protected by any ordering or locking, and vulnerable to various startup races. Instead, for variable TSC machines, register the cpufreq notifier and get the TSC frequency directly from the cpufreq machinery. Not only is

[PATCH v2: kvm 2/4] Kill the confusing tsc_ref_khz and ref_freq variables.

2009-09-28 Thread Zachary Amsden
They are globals, not clearly protected by any ordering or locking, and vulnerable to various startup races. Instead, for variable TSC machines, register the cpufreq notifier and get the TSC frequency directly from the cpufreq machinery. Not only is it always right, it is also perfectly accurate,