Thnk you for posting this, Mourad.. it's helping me track it down. I just don't see the error. For some reason, the new code thinks that your table should only be 1 entry long, when we know it should be three. this is handled by the cpu.table_size variable. I compute the table size with these two lines:


         cpu->table_size = ((cpu->max_speed-cpu->min_speed)/step) + 1;
         cpu->table_size += ((cpu->max_speed-cpu->min_speed)%step)?1:0;

which, given the values we know you have (from your debug output), should be:
table_size = ((798000 - 606000)/100000) + 1;
table_size += ((798000 - 606000)%100000)?1:0;


Last time i did math, that should make 3. which is what you want (798000, 698000, 606000.. since step (-s option) is 100000 (100Mhz) by default. )

Would someone seeing this problem mind posting the output of /sys/devices/system/cpu/cpu0/cpufreq/* ? I suspect maybe in the 2.6.10+ timeframe the cpufreq pmac driver they might have switched to using Mhz instead of Khz, which i don't detect and fixup until later in the code.

Note to the bugzilla error messages, the error message about scaling_available_frequencies is harmless. It's only seen on PPC because AFAIK the pmac cpufreq driver is the only cpufreq driver that doesn't support that file (I have a patch, as mentioned above but it's not high on BenH's list to merge)... however, I coded the program to still work without that file, and it -should- be working for these people. I don't have a PPC to test on right now.

I'm not going to release a 0.96 until i fix this problem...

john.c

On Sun, 8 May 2005, Mourad De Clerck wrote:

ibook:~# /usr/sbin/powernowd -d -v -v -v -v
PowerNow Daemon v0.95, (c) 2003-2005 John Clemens
Settings:
 verbosity:        4
 mode:             1     (AGGRESSIVE)
 step:           100 MHz (100000 kHz)
 lowwater:        20 %
 highwater:       80 %
 poll interval: 1000 ms
Found 1 cpu:  -- 1 thread (or core) per physical cpu
Couldn't open file: No such file or directory
 cpu0: 606Mhz - 798Mhz (1 steps)
    step1 : 606Mhz
PCT = 0.000000
Setting speed to 606000
mode=0, str=606000
PCT = 0.000000
<snip - not a lot happens here, stays at 0.000000>
PCT = 0.232323
PCT = 0.270000
PCT = 0.376238
PCT = 0.929231
Setting speed to 606000
mode=2, str=606000
PCT = 1.000000
<snip - same thing repeated here>
Setting speed to 606000
mode=2, str=606000
PCT = 0.713115
PCT = 0.702970
PCT = 0.790000
PCT = 0.770000
PCT = 0.743243
PCT = 0.803371
Setting speed to 606000
mode=2, str=606000
PCT = 0.686275
PCT = 0.906977
Setting speed to 606000
mode=2, str=606000
PCT = 0.841270
Setting speed to 606000
mode=2, str=606000
PCT = 0.803150
Setting speed to 606000
mode=2, str=606000
PCT = 0.040000
PCT = 0.019802
<snip - etc. etc. etc....>
PCT = 0.000000
PCT = 0.010000
Setting speed to 606000
mode=2, str=606000
Statistics:
 17 speed changes in 92 seconds
PowerNow Daemon Exiting.
5A>


for completeness:

ibook:~# cat /proc/cpuinfo
processor       : 0
cpu             : 7455, altivec supported
clock           : 606MHz
revision        : 3.3 (pvr 8001 0303)
bogomips        : 610.30
machine         : PowerBook6,3
motherboard     : PowerBook6,3 MacRISC3 Power Macintosh
detected as     : 287 (iBook G4)
pmac flags      : 0000001b
L2 cache        : 256K unified
memory          : 640MB
pmac-generation : NewWorld




Thanks,


-- Mourad DC



-- John Clemens http://www.deater.net/john john at deater.net "I Hate Quotes" -- Samuel L. Clemens


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Reply via email to