Date: Wed, 28 Feb 2007 01:19:02 +0100 From: Max Laier <max@love2party.net> To: Nate Lawson <nate@root.org> Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: PATCH - update TSC freq when cpufreq changes it Message-ID: <200702280119.08987.max@love2party.net> In-Reply-To: <45E4ADCD.4090909@root.org> References: <45E4ADCD.4090909@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart12090080.RuxX3nTSIa Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 27 February 2007 23:16, Nate Lawson wrote: > Attached is a patch that uses eventhandlers to update the TSC freq. > This is important because DELAY() uses TSC directly (on i386 and amd64) > but the rate calculated at boot changes if cpufreq is in use. > > It maintains current behavior that cpufreq transitions are denied if > TSC is the active timecounter. The API is that there is a pre and post > transition eventhandler that is called by the cpufreq core. The pre > handler is passed the next state (including freq, power, etc.) and can > store a non-zero status value in the output arg to indicate it wants to > reject the transition. The post handler also is passed the next state > and the result of the transition (0 on success). Any reason for passing the result to the post handler in by reference -=20 other than being able to re-use the same function type as in the pre=20 handler? API-wise this seems to be a mistake as one consumer could mess=20 up the result for the rest and the variable name "error" in the INVOKE=20 also suggests that this could be used to report back. > Once any issues are addressed, I'll update this for amd64, ALTQ, and > possibly PC98. Non-x86 archs can stick with the current behavior if > they're satisfied or hook the eventhandlers provided to DTRT. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart12090080.RuxX3nTSIa Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBF5Mp8XyyEoT62BG0RAuczAJ9piNYhaOYLNzSFaT9S8dgPjW19lACeJkOP QFM0HizveGEwWhKVusvYWZs= =0Uha -----END PGP SIGNATURE----- --nextPart12090080.RuxX3nTSIa--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702280119.08987.max>