Date: Sun, 30 Oct 2011 19:10:15 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: current@freebsd.org Subject: x86: how to get maximum possible CPU frequency ? Message-ID: <20111030171015.GR50300@deviant.kiev.zoral.com.ua>
next in thread | raw e-mail | index | archive | help
--gCjauHB7LOSWqPxs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 ? --gCjauHB7LOSWqPxs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6thPYACgkQC3+MBN1Mb4iCEACgjX9e2TBMIx1K078YHRqObpfM NOsAn3xZjU5+AYSwWkhpXNzpAAqT52y9 =QWqW -----END PGP SIGNATURE----- --gCjauHB7LOSWqPxs--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111030171015.GR50300>