[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] speedfreq-dynamic patch for responsive wake-ups
From:       Jim Northrup <glamdring-inc () comcast ! net>
Date:       2005-02-23 2:57:31
Message-ID: 421BF11B.8040905 () comcast ! net
[Download RAW message or body]

Speedfreq "dynamic" setting is cool (literally), it saves me from 
burning all my cpu's wattage while my firewall/router/printserver idles 
at 300mhz (on a 2400 p4), and it dials in the mhz required for a 
moderate program to run at .8 idle which leaves room for responsiveness 
to new load.

Every time I emerge it I hack this small tidbit in to solve the 
following author-documented idiosyncracy:

"but some applications may experience erratic performance because of the 
latency in speeding up the CPU."

When I ran vanilla speedfreq I would sometimes rifle through tons of 
diagnostics to locate the lag, before checking speedfreq.  slow decay is 
fine but slow response is not as useful.

This one-line patch makes speedfreq perfect imho.  it spikes the cpu 
frequency which will adjust itself down stepwise as usual. 

Jim

diff -u speedfreq-0.7.2/speedfreqd.c speedfreq-0.7.2b/speedfreqd.c
--- speedfreq-0.7.2/speedfreqd.c        2003-10-17 21:56:53.000000000 -0700
+++ speedfreq-0.7.2b/speedfreqd.c       2005-02-22 18:31:08.173420744 -0800
@@ -464,7 +464,7 @@
        }

        if (ratio < FREQ_UP)
-               target += FREQ_STEP;
+               target += FREQ_STEP*8;
        else if (ratio > FREQ_DOWN)
                target -= FREQ_STEP;

--
gentoo-dev@gentoo.org mailing list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic