diff options
author | Zachary Amsden <zamsden@redhat.com> | 2009-09-29 11:38:35 -1000 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 09:32:12 +0200 |
commit | 0cca790753bf0cab4b070801a46df8e1297c17f6 (patch) | |
tree | 9b2887a5f00872248875ecd001d03e36e425f97a /tools/perf | |
parent | b820cc0ca20fdcf8014d8e57421cf29095e39392 (diff) |
KVM: Kill the confusing tsc_ref_khz and ref_freq variables
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, as no error prone measurement
is required.
On such machines, when a new CPU online is brought online, it isn't clear what
frequency it will start with, and it may not correspond to the reference, thus
in hardware_enable we clear the cpu_tsc_khz variable to zero and make sure
it is set before running on a VCPU.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions