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 ?

Attachment: pgpG9zwXR7qbc.pgp
Description: PGP signature

Reply via email to