From owner-freebsd-current@FreeBSD.ORG Wed Feb 28 00:19:24 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D184916B5A2; Wed, 28 Feb 2007 00:19:24 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC7A13C491; Wed, 28 Feb 2007 00:19:24 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.66.35.158] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1HMCXG1ogj-0006Vq; Wed, 28 Feb 2007 01:19:19 +0100 From: Max Laier Organization: FreeBSD To: Nate Lawson Date: Wed, 28 Feb 2007 01:19:02 +0100 User-Agent: KMail/1.9.5 References: <45E4ADCD.4090909@root.org> In-Reply-To: <45E4ADCD.4090909@root.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12090080.RuxX3nTSIa"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200702280119.08987.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 X-Provags-ID2: V01U2FsdGVkX19IuyNlf0kZ5jwXnIVmgctu6TwsmDi0oYLkgqW lzdtzAzTmJsZV5vzYlvbrvHTH1Iw9QWVI0AADiz8iu7lu8ixog q42iKRyhvz5fiF/IGvnIg== Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: PATCH - update TSC freq when cpufreq changes it X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 00:19:24 -0000 --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--