Re: powerd and it's "wakeup" behaviour

From: Oliver Fromme <olli_at_lurza.secnetix.de>
Date: Tue, 14 Aug 2007 14:09:49 +0200 (CEST)
Harald Schmalzbauer <h.schmalzbauer_at_omnisec.de> 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.'
Received on Tue Aug 14 2007 - 10:09:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC