Date: Tue, 14 Dec 2010 15:30:33 -0500 From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@FreeBSD.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r216443 - in head/sys: amd64/amd64 dev/acpica i386/i386 Message-ID: <201012141530.40603.jkim@FreeBSD.org> In-Reply-To: <201012142007.oBEK7pLd028994@svn.freebsd.org> References: <201012142007.oBEK7pLd028994@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 14 December 2010 03:07 pm, Jung-uk Kim wrote: > Author: jkim > Date: Tue Dec 14 20:07:51 2010 > New Revision: 216443 > URL: http://svn.freebsd.org/changeset/base/216443 > > Log: > Stop lying about supporting cpu_est_clockrate() when TSC is > invariant. This function always returned the nominal frequency > instead of current frequency because we use RDTSC instruction to > calculate difference in CPU ticks, which is supposedly constant for > the case. Now we support cpu_get_nominal_mhz() for the case, > instead. Note it should be just enough for most usage cases > because cpu_est_clockrate() is often times abused to find maximum > frequency of the processor. Actually, I wanted to support cpu_est_clockrate() as well and the following was my naive attempt: http://people.freebsd.org/~jkim/tsc.diff Unfortunately, it only worked for AMD64 Family 0Fh and below where we don't need this hack at all. I tried everything I could (e.g., fooling around with branch prediction) but it constantly gave me better MHz for under-clocked cases. :-/ Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012141530.40603.jkim>