Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting AMD64 powernow up and working under Gentoo
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
navier-stokes
n00b
n00b


Joined: 03 Jul 2004
Posts: 41

PostPosted: Wed Mar 16, 2005 9:05 am    Post subject: Reply with quote

Hi all,
will this work on on smp systems yet?
_________________
Tyan Thunder K8W; dual 244's, 2Gigs ECC, SBLive, G4Ti4600,
Flatron lcd 885LE
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Wed Mar 16, 2005 9:28 am    Post subject: Reply with quote

Quote:
will this work on on smp systems yet?


same question here, doesnt seem to work atm.

cheers
Back to top
View user's profile Send private message
parapulse
n00b
n00b


Joined: 03 Apr 2004
Posts: 1

PostPosted: Wed Mar 16, 2005 1:24 pm    Post subject: Reply with quote

I'm having problems getting cpu scaling working on my Compaq R3000z laptop using gentoo-dev-source 2.6.11-r3. I assume the problems stem from the "powernow-k8: BIOS error - no PSB" error showing up in dmesg. I tried updating to the latest BIOS, but that didn't fix (or change) the error message. My BIOS doesn't have an option for Cool'n'Quiet, but it worked fine using 2.6.9. dmesg and kernel config below:

dmesg | grep powernow
Code:
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
powernow-k8: BIOS error - no PSB

Kernel Config
Code:
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_PROC_INTF is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_24_API is not set
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_TABLE=y

Output from powernowd
Code:
powernowd: Couldn't open file /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

'ls /sys/devices/system/cpu/cpu0' reveals no 'cpufreq' folder or any other files or folders for that matter.


Does anyone have a solution for this (besides downgrading)? Everything else on my laptop is working beautifully. Just this one nagging problem away from perfection :)
Back to top
View user's profile Send private message
beyonddeath
n00b
n00b


Joined: 22 Sep 2004
Posts: 45

PostPosted: Thu Mar 17, 2005 12:05 am    Post subject: SMP system Reply with quote

I have a dual opteron 242 system and im trying to get power now working, however during boot it says

ACPI: processor [CPU1] (supports C1, 8 Throttling states)
ACPI: processor [CPU2] (supports c1)
...
powernow-k8: Power state transitions not supported
powernow-k8: Power state transitions not supported

I dont know if i have the bios settings correct or not, i have all its acpi options turned on. (I tried to get tyans latest bios but it wont update it for some reason) I looked for something CnQ and nothing close. My setup is a tyan tiger k8w s2875 with dual opteron 242's and 1gb ram. Any suggestions appreciated!
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Thu Mar 17, 2005 8:12 am    Post subject: Reply with quote

Quote:
ACPI: processor [CPU1] (supports C1, 8 Throttling states)
ACPI: processor [CPU2] (supports c1)
powernow-k8: Power state transitions not supported
powernow-k8: Power state transitions not supported


same here with dual opterons !

As said, i think smp is not supported atm. BUT C&Q seems to work: under heavy load i see my fans running faster.

cheers
Back to top
View user's profile Send private message
hvengel
Guru
Guru


Joined: 19 Sep 2004
Posts: 515

PostPosted: Thu Mar 17, 2005 5:37 pm    Post subject: Reply with quote

I have read else where that Opterons can not speed scale because of the use of registered memory. In any can Opteron processors by design do not support speed/voltage scaling. I think AMD missed an opertunaty as this is a feature that users like and I think this ever so slightly reduces market share for Opterons. On the other hand we will be able to get dual core Athlon 64s late this year or early next year and presumably these will support speed/voltage scaling.
Back to top
View user's profile Send private message
drhirsch
n00b
n00b


Joined: 08 May 2004
Posts: 66
Location: Germany

PostPosted: Mon Mar 21, 2005 11:14 am    Post subject: Ondemand governor sucks. Reply with quote

I gave the ondemand governor a try and noticed a slow system (bad responsivness).

The frequencies/voltages seemed to switch fine, so I wondered where this slow feeling came from.
I tried
Code:

watch -n 0.1 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq


and watched the output while starting "kdevelop". With max frequency this needs something about 3 seconds with 10 sources to start, if everything is in the disk cache. Now it needed 6 seconds. I noticed the frequency didn't go up at the the moment I started it, but about 1-2 seconds later, when app was almost loaded.
Further investigating, I inspected the values at /sys/devices/system/cpu/cpu0/cpufreq/ondemand .

It turns out, that on my system (clawhammer 754, 2 GHz, 1MB 2nd Level Cache) the transition latencys are quite high:

Code:

cruncher ondemand # cat sampling_rate
1240000
cruncher ondemand # cat sampling_down_factor
10


Which means, for a frequency transition upwards, the cpu usage is sampled every 1,24 seconds, for scaling downwards every 12,4 (!) seconds. Which means, every action which needs less than about a second (for instance opening a konqueror window) is likely to be done at slow speed (800 MHz in my case), others, which take longer than the sampling period, get fullspeed only after a noticable latency, and so, need up to 3 seconds longer to complete (1,24 seconds * 2.5 speed factor). Which was exactly what i observed.

There is not much room in adjusting those samling frequencys, the minimum for me is

echo "620000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_down_factor

which reduces the lag to 1.5 seconds. For me this is not sufficient, so i will stick to cpudynd.
Back to top
View user's profile Send private message
hvengel
Guru
Guru


Joined: 19 Sep 2004
Posts: 515

PostPosted: Mon Mar 21, 2005 8:11 pm    Post subject: Reply with quote

Looks like you have allready open a bug report on this http://bugzilla.kernel.org/show_bug.cgi?id=4379 This is a good thing.

I agree that the default sampling rate is too slow and even at the lowest value, 0.62 seconds, it is still over 6 times longer than the default value that cpudynd uses, which is 0.1 seconds.

I don't think that using the transition latency as a factor in calculating the sampling rate is a design flaw since too fast of a sampling rate will result in the processor sending too much time doing nothing because of the high number of transitions. But the transition latancies of these processors are on the order of 30 to 40 MICROSECONDS. Therefore if the sampling rate was to be 1000 times the trasition latency time the sampling rate would be every 30 to 40 milliseconds or about 300 times as fast as the current default sampling rate. There appears to be a coding error in the ondemand goveror code.
Back to top
View user's profile Send private message
hvengel
Guru
Guru


Joined: 19 Sep 2004
Posts: 515

PostPosted: Mon Mar 21, 2005 8:24 pm    Post subject: Reply with quote

I also found this: http://lwn.net/Articles/109892/ where this problem is decribed as "..a cosmetic annoyance in /proc/cpuinfo" So this appears to be a known problem that has not been taken seriously in the past.
Back to top
View user's profile Send private message
drhirsch
n00b
n00b


Joined: 08 May 2004
Posts: 66
Location: Germany

PostPosted: Tue Mar 22, 2005 10:00 am    Post subject: Reply with quote

I also observrd the ondemand code was written by a intel developer. On intel the latencies are a magnitude smaller than on amd, so the problem didn't appear or was almost not noticable.

There seems to be no coding bug in the ondemand governor, the transition latency given by struct cpufreq_policy.cpuinfo.transition_latency is 1240 us or 1,24 ms on my amd box. I really think its a design flaw. Also, it seems the factors for sampling_rate_minx/max were chosen rather arbitrarily. Factor 500 for min, 500000 for max, downward transition 10 times slower than upward, where does it come from?

You mention the processor would be doing to much of nothing, if the sampling rate is too fast. True, but how could that happen with a fixed sampling rate? And the ondemand governor will refuse to run at all, if the cpu has a trasition time > 10 ms. So at a sampling rate of 50 ms, even if there is a transition up/down every sample, because a application consumes 100% cpu for 50 ms every 100 ms (very unlikely), the cpu will be at most 20% of the time in a transition. Since it is almost spending 40% of time time doing nothing, this isn't neccessarily a bad thing.

I patched my own kernel to have a sampling rate of 50 ms, and so far it works perfect :-)
Back to top
View user's profile Send private message
hvengel
Guru
Guru


Joined: 19 Sep 2004
Posts: 515

PostPosted: Tue Mar 22, 2005 5:05 pm    Post subject: Reply with quote

I have also modified my code to get this working right. All I did was change

#define MIN_SAMPLING_RATE (def_sampling_rate / 2)

to

#define MIN_SAMPLING_RATE (def_sampling_rate / 20)

in ondemand.c

This allows me to now set my sampling rate as low as 62 milliseconds which is 20 times as fast as the defualt rate.
Back to top
View user's profile Send private message
hvengel
Guru
Guru


Joined: 19 Sep 2004
Posts: 515

PostPosted: Tue Mar 22, 2005 9:25 pm    Post subject: Reply with quote

drhirsch wrote:
snip

downward transition 10 times slower than upward, where does it come from?

snip


At the default sampling rate (ie. every 1.24 seconds) this is a very bad thing since it will not let the the CPU back down to it's lowest speed for about 30 seconds when the CPU goes from 100% to idle. But if you think about having a faster sampling rate, like the 50 ms rate you are now using, then delaying the reduction in CPU speed seems to me like a good thing. After all many programs that use a lot of CPU will cycle very quickly between 100% and near 0% CPU. So you want the CPU to hold onto the higher speed for a little while so that it is not doing state transitions while this is going on since that will make the machine more responsive.

As an example when I run emerge sync at the stage where it is updating the portage cache the CPU will cycle up and down very quickly and will do this for a little over a minute. If I set my sampling rate at 100 ms and the down transition multiplier to 1 (goes down as fast as it goes up) the CPU speeds will cycle up and down continuously while this is running. But if I set the down transition multiplier to 5 the CPU will remain at full speed for most of the portage cache update. Yet the CPU will go to it lowest speed after going idle in about a second.

By the way I too have noticed that reducing the sampling rate interval has made my machine more responsive. The difference is not huge but it is enough to be noticed and it is a very simple code change to implement.
Back to top
View user's profile Send private message
drhirsch
n00b
n00b


Joined: 08 May 2004
Posts: 66
Location: Germany

PostPosted: Tue Mar 22, 2005 11:30 pm    Post subject: Reply with quote

hvengel wrote:
drhirsch wrote:
snip

downward transition 10 times slower than upward, where does it come from?

snip


But if I set the down transition multiplier to 5 the CPU will remain at full speed for most of the portage cache update. Yet the CPU will go to it lowest speed after going idle in about a second.


Yes, i had something like that in mind, when i saw the slower downward time. But im not questioning the use of this factor, I am questioning the value. "10" is a very human number, a number which a developer choses, if he knows nothing about the value he should use. The right thing would be to analyze some typical cpu usage patterns :-)

Quote:

By the way I too have noticed that reducing the sampling rate interval has made my machine more responsive. The difference is not huge but it is enough to be noticed and it is a very simple code change to implement.


check this out:

Code:

$ time konqueror
real    0m2.865s
user    0m0.909s
sys     0m0.109s

$ time konqueror
real    0m3.059s
user    0m0.916s
sys     0m0.107s

$ time konqueror
real    0m3.428s
user    0m0.907s
sys     0m0.116s


Three starts of konqueror, each one using about 1 second (user+sys) cpu. This is with 50 ms sampling rate.

Code:

$ time konqueror
real    0m4.718s
user    0m1.545s
sys     0m0.154s

$ time konqueror
real    0m4.798s
user    0m1.853s
sys     0m0.185s

$ time konqueror
real    0m3.935s
user    0m1.521s
sys     0m0.159s


And now, with the default rate of 1,24 s, it needs almost 2 seconds. Additionally the cpu spends some 10 s after the start in full speed mode, useless of course.
Back to top
View user's profile Send private message
~L~
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 154
Location: Finland

PostPosted: Thu Mar 31, 2005 6:27 pm    Post subject: Reply with quote

andrewd18 wrote:
Code:
StubbornAesthetics init.d # powernowd start
powernowd: PowerNow Daemon v0.90hun6, (c) 2003-2004 John Clemens
powernowd: Found 1 physical cpu and 1 virtual cpu:
powernowd: Couldn't open file /sys/devices/system/cpu/cpu255/cpufreq/cpuinfo_max_freq
Segmentation fault



I get the same error. I've used powernowd for year. but today i upgraded to 2.6.11-r4 from 2.6.9-r9 and I get this.
The correct path would be /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq (and this gives 2000000 like it should for my amd64 3200) but for some reason powernowd is looking for it from cpu255. I took the source from my distfiles and modified it a bit


Code:
pentele powernowd-0.90hun6 # diff powernowd.c powernowd.c.old
436c436
<       snprintf(cpustr, 27, "cpu0/cpufreq/", cpu->phys_cpuid);
---
>       snprintf(cpustr, 27, "cpu%u/cpufreq/", cpu->phys_cpuid);


> emerge -C powernowd
> make
> make install
> /etc/init.d/powernowd start


All is well :D

Maybe someone knows better how to fix this properly...
Back to top
View user's profile Send private message
tscolari
l33t
l33t


Joined: 02 May 2004
Posts: 602
Location: curitiba - pr - Brazil

PostPosted: Mon Apr 18, 2005 11:55 am    Post subject: Re: ondemand governor Reply with quote

danyer wrote:
I agree with dangertools.
The guide Albert_Alligator provided is good, but since kernel 2.6.9 the usage of cpudyn is obsolete. The ondemand governor is the new way.

I have ondemand governor compiled in kernel and set up as the default governor, and my amd64 works cool'n quiet (1000, 1800, 2000, 2200 mhz and the voltage changing from 1.06 to 1.46V) without any userspace tools.

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
(everything on one line) and you are set to go.

Warning: make sure that the ondemand governor is compiled in the kernel by typing:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

on my computer I get: ondemand powersave userspace performance


what should i do if i dont have a /sys/devices/cpu dir?

and what does this output means?
Code:

>dmesg | egrep powernow
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
powernow-k8: BIOS error - no PSB

_________________
------------------------------------
Tiago Scolari
Back to top
View user's profile Send private message
hvengel
Guru
Guru


Joined: 19 Sep 2004
Posts: 515

PostPosted: Mon Apr 18, 2005 11:57 pm    Post subject: Re: ondemand governor Reply with quote

tscolari wrote:

what should i do if i dont have a /sys/devices/cpu dir?

and what does this output means?
Code:

>dmesg | egrep powernow
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
powernow-k8: BIOS error - no PSB


It means you processor is an Opteron and unless you have a rev e core (just became available so not likely) you can not use speed scaling.
Back to top
View user's profile Send private message
tscolari
l33t
l33t


Joined: 02 May 2004
Posts: 602
Location: curitiba - pr - Brazil

PostPosted: Tue Apr 19, 2005 12:11 am    Post subject: Re: ondemand governor Reply with quote

hvengel wrote:
tscolari wrote:

what should i do if i dont have a /sys/devices/cpu dir?

and what does this output means?
Code:

>dmesg | egrep powernow
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
powernow-k8: BIOS error - no PSB


It means you processor is an Opteron and unless you have a rev e core (just became available so not likely) you can not use speed scaling.


it was suposed to be a atlhon 64 3000+ 939, im a little confused now
_________________
------------------------------------
Tiago Scolari
Back to top
View user's profile Send private message
fredor
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2003
Posts: 84
Location: UK

PostPosted: Wed Apr 20, 2005 1:45 pm    Post subject: Reply with quote

Powernow worked OK for me until March 20th, then I started to get the messages like 'tscolari'.
Output from 'cat /var/log/messages | grep powernow
Quote:
Mar 20 11:41:25 fred powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
Mar 20 11:41:25 fred powernow-k8: 0 : fid 0x2 (1000 MHz), vid 0x12 (1100 mV)
Mar 20 11:41:25 fred powernow-k8: 1 : fid 0xa (1800 MHz), vid 0x6 (1400 mV)
Mar 20 11:41:25 fred powernow-k8: 2 : fid 0xc (2000 MHz), vid 0x2 (1500 mV)
Mar 20 11:41:25 fred powernow-k8: ph2 null fid transition 0xc
Mar 20 16:10:51 fred powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
Mar 20 16:10:51 fred powernow-k8: BIOS error - no PSB
Mar 20 19:06:12 fred powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
Mar 20 19:06:12 fred powernow-k8: BIOS error - no PSB

I have Athlon64 3000+ 754.
I don't know what caused the error which I didn't notice at the time. I update regularly and possibly it was something like 'dbus'.
It's not the kernel because it occured on another system running a different kernel.
Back to top
View user's profile Send private message
Tshwala
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 86
Location: South Africa

PostPosted: Wed Apr 20, 2005 5:42 pm    Post subject: Reply with quote

Hi anyone got an idea why this would be happening?


Code:
sudo echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
bash: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied
Back to top
View user's profile Send private message
fredor
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2003
Posts: 84
Location: UK

PostPosted: Wed Apr 20, 2005 6:18 pm    Post subject: Reply with quote

Somehow 'Cool & Quiet' got disabled in the BIOS.
Enabled 'Cool & Quiet' and the error has now disappeared..
Back to top
View user's profile Send private message
tscolari
l33t
l33t


Joined: 02 May 2004
Posts: 602
Location: curitiba - pr - Brazil

PostPosted: Thu Apr 21, 2005 12:13 am    Post subject: Reply with quote

fredor wrote:
Somehow 'Cool & Quiet' got disabled in the BIOS.
Enabled 'Cool & Quiet' and the error has now disappeared..


hmmm thanks a lot :)
_________________
------------------------------------
Tiago Scolari
Back to top
View user's profile Send private message
MrIch
Apprentice
Apprentice


Joined: 25 May 2002
Posts: 204

PostPosted: Thu Apr 21, 2005 2:18 pm    Post subject: Reply with quote

I have an Athlon64 3000+ socket 939, with a MSI K8T Neo2-FIR

Code:

Apr 19 11:51:06 dystopianray powernow-k8: vid trans failed, vid 0x3, curr 0x4
 Apr 19 11:51:06 dystopianray powernow-k8: transition frequency failed
 Apr 19 11:51:07 dystopianray powernow-k8: vid trans failed, vid 0x3, curr 0x4
 Apr 19 11:51:07 dystopianray powernow-k8: transition frequency failed
Back to top
View user's profile Send private message
Hayl
Guru
Guru


Joined: 28 Jan 2003
Posts: 442
Location: Calgary, Alberta, Canada

PostPosted: Wed May 04, 2005 2:56 am    Post subject: Reply with quote

do you have to enable the governor in /proc as well as run the powernowd daemon or do you just run one or the other :?:
_________________
"I do not fear computers. I fear lack of them." - Isaac Asimov
Back to top
View user's profile Send private message
zinion
Guru
Guru


Joined: 27 Oct 2004
Posts: 541
Location: Ruhgebietshausen

PostPosted: Wed May 04, 2005 9:54 am    Post subject: Reply with quote

Ok I didn't read all Sites only the beginning.

I'm wondering why people do all this things with cpudyn. Ich simply ermerged the powernowd, added it to default runlevel and everything is working beautiful..
_________________
Es ist schön und warm
hier im Gentoo-Land
Back to top
View user's profile Send private message
MrIch
Apprentice
Apprentice


Joined: 25 May 2002
Posts: 204

PostPosted: Wed May 04, 2005 10:09 am    Post subject: Reply with quote

is there still no solution for "vid trans failed, vid 0x3, curr 0x4"?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 3 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum