From owner-freebsd-current@FreeBSD.ORG Tue Aug 14 12:09:57 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78F6216A417 for ; Tue, 14 Aug 2007 12:09:57 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2001:1b20:1:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id D251613C457 for ; Tue, 14 Aug 2007 12:09:56 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (vmzsxe@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l7EC9nlg082369; Tue, 14 Aug 2007 14:09:54 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l7EC9nrb082368; Tue, 14 Aug 2007 14:09:49 +0200 (CEST) (envelope-from olli) Date: Tue, 14 Aug 2007 14:09:49 +0200 (CEST) Message-Id: <200708141209.l7EC9nrb082368@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, h.schmalzbauer@omnisec.de In-Reply-To: <200708132141.43165.h.schmalzbauer@omnisec.de> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 14 Aug 2007 14:09:54 +0200 (CEST) X-Mailman-Approved-At: Tue, 14 Aug 2007 12:15:39 +0000 Cc: Subject: Re: powerd and it's "wakeup" behaviour 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: Tue, 14 Aug 2007 12:09:57 -0000 Harald Schmalzbauer wrote: > I'm using cpufreq (acpi_perf (800/9800 500/5900) with acpi_throttle and I have > limited debug.cpufreq.lowest=250, so dev.cpu.0.freq_levels reads: > 800/9800 700/8575 600/7350 500/5900 437/5162 375/4425 312/3687 250/2950 > > I haven't tested the saving which acpi_throttling provides, but I think I can > gain some minutes over plain 800/500MHz(Vcore)switch. > > Now the problem is that "waking up" from 250 MHz to full speed needs too much > time to be effective for short term task like displaying a PDF. > Reading the file doesn't stress the CPU so powerd increases "clock" > (paranthesized because clock has only two states, but throttling adds 6 > steps) in 7 steps to 800MHz. > > I'd love to have a option which tells powerd to slowly step down, but jump to > full throttle if threshold of cpu usage is reached, regardless the current > clock setting. So a CPU usage peak would give full performance first, then > slowly stepping down again according to the CPU usage. > > Even my old 800MHz P3-m is fast enough to complete "cpu hungry" tasks in a > quiet short time, so slowly stepping clock up is not optimal form me because > it's not that fast that comleting the task with quarter speed doesn't feel > sluggish. > > Any thoughts? > Anyone who could and want to implement such a feature? (my programming skills > are far beyond...) I've needed a similar feature for some time and I have a patch, so I cleaned it up a bit and submitted it along with an update to the manpage. It's PR bin/115513: http://www.freebsd.org/cgi/query-pr.cgi?pr=115513 Apply the diff relative to src/usr/sbin/powerd, then "make clean && make && make install", and restart powerd with option -u 100. That should have the effect that you described above. The patch is relative to RELENG_6 (it can be applied manually to -current without problems). If you have difficulty extracting it from the PR, the patch is also available from this URL: http://www.secnetix.de/~olli/tmp/powerd.diff Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.'