x86: how to get maximum possible CPU frequency ?

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Sun, 30 Oct 2011 19:10:15 +0200
Assume we are running on the single-package X86 machine, how to answer
the question: what is the possible maximum tsc frequency ?

I read tsc_levels_changed(), is it the right way to query the max
frequency for the general purpose driver ? If yes, could the code be
made into the utility function ?

BTW, there is some usage of the barriers in sysctl_machdep_tsc_freq()
that I do not understand. When the read from tsc_freq is performed
with the acquire semantic ? Why there are two store barriers when
tsc_freq and tsc_timecounter.tc_frequency are written ? I would think
that a single barrier on the last write is enough, but is it needed
at all ?

Received on Sun Oct 30 2011 - 16:10:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC