From owner-freebsd-stable@FreeBSD.ORG Wed Nov 30 20:37:28 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D721A16A41F; Wed, 30 Nov 2005 20:37:28 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2074943D5C; Wed, 30 Nov 2005 20:37:27 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1EhYhD-0002n7-00; Wed, 30 Nov 2005 21:36:55 +0100 Date: Wed, 30 Nov 2005 21:36:55 +0100 To: Nate Lawson Message-ID: <20051130203655.GA10628@poupinou.org> References: <20051130133224.GA4713@poupinou.org> <438DE9D0.6080107@root.org> <20051130201250.GC4713@poupinou.org> <438E0A58.60609@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <438E0A58.60609@root.org> User-Agent: Mutt/1.5.9i From: Bruno Ducrot Cc: Marco Calviani , freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org, freebsd-questions@freebsd.org Subject: Re: cpufreq and changing driver X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2005 20:37:29 -0000 On Wed, Nov 30, 2005 at 12:23:52PM -0800, Nate Lawson wrote: > Bruno Ducrot wrote: > >On Wed, Nov 30, 2005 at 10:05:04AM -0800, Nate Lawson wrote: > > > >>Marco Calviani wrote: > >> > >>>Hi, > >>> > >>>2005/11/30, Bruno Ducrot : > >>> > >>> > >>>>You have to load the cpufreq.ko module at boot. > >>>>Adding that line: > >>>>cpufreq_load = "YES" > >>>>to /boot/loader.conf > >>>>should be OK. > >>> > >>> > >>>I have that line in that position, and it seems working. The point is > >>>that i would like to change the driver and use (AFAIU) a better driver > >>>for my system (est). > >>>In particular i have: > >>> > >>>dev.cpu.0.%desc: ACPI CPU > >>>dev.cpu.0.%driver: cpu > >>>dev.cpu.0.%location: handle=\_PR_.CPU0 > >>>dev.cpu.0.%pnpinfo: _HID=none _UID=0 > >>>dev.cpu.0.%parent: acpi0 > >>> > >>>Maybe i didn't understood well: but what i have to do to use the Intel > >>>Enhanced SpeedStep driver? > >> > >>You should send the full output of "sysctl dev.cpu". There is no > >>cpufreq driver (est, acpi_perf, or other) driver running. Perhaps look > >>at your dmesg to see if one is probing/attaching. > >> > >>If you are using acpi and load cpufreq.ko, you've got all the cpufreq > >>drivers in one package. The right one for your platform will > >>automatically probe/attach. > >> > >> > >>>>powerd need some rework in order to get it working properly. There > >>>>is one FreeBSD project on that subject if you are interrested. > >>> > >>>Well, thanks i'm very interested, although i'm not at all experienced > >>>in kernel programming.... > >>> > >>>I'm not inside this issue, but it would not be possible to "emulate" > >>>the behaviour of the ondemand governor? (sorry if this question makes > >>>no sense) > >> > >>I have no idea what you mean by "on-demand governor". The only > >>automated control of cpu speed is either by the BIOS (which we can't > >>control) or the TM/TM2 (and that one is heat-based, not load-based). > >> > > > > > >The ondemand governor is basically an implemation of the following > >algorithm: > > > >There is a counter, say count. > > > >at each given fixed intervall: > >if (idle less than a watermark) { > > frequency full > > reinitialise count to 10 > >} else if (idle more than another watermark) { > > decrement count > > if count is 0 { > > down one step the frequency > > } > >else reinitilize count to 10 > > > > > >Note that in the latter case, the down step is performed only > >after 10 such comparison. In other word, intervall is ten times > >larger for the down side than the full frequency one. > > > >This work well when you can perform, say, 20 to 50 transitions per > >second. Otherwise, it is pretty bad. > > > > Send me a URL to the datasheet that says Intel implemented this. http://www.intel.com/cd/ids/developer/asmo-na/eng/195910.htm?prn=Y > That algorithm is basically what powerd does. So just run powerd. Indeed. -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care.