Contributed by jj on from the power-is-cool dept.
One of the problems right now is that even though nearly every amd64 processor supports powernow or Cool'n'Quiet (same thing) many people go without.
This is because we currently only support the so called
legacy method for getting the data we need to transition states and
many vendors skip providing these tables.
The recomended way to get this data nowadays is to use the ACPI _PSS
object. However, after implementing ACPI _PSS support for powernow
(another diff another day) it turns out that the _PSS is missing from
a fair number of systems...
So instead of relying on the bios vendor to provide tables I have spent the last three days hardcoding the p_state data for every socket 939/ 940/ and 754 socket opteron/turion/sempron/athlon64 processor that has more than one state. Entering the data into this was very boring and is fairly error prone therefore this diff is going to need lots and lots of testing.
The diff can be found here.
Basically you should test if you have a amd64 processor of the brand and socket types I outlined above and you do not have hw.setperf when you type "sysctl hw". If that describes your system please apply the above diff and test with either GENERIC or GENERIC.MP (and please regardless of it works on your machine or not send me the dmesg it might just be a typo preventing it from working!)
If after doing the above you do see a line like e.g.
cpu0: Cool'n'Quiet K8 1808 MHz: speeds: 1800 1000 MHzin your dmesg please test it:
(make sure you dont have apmd running with the -C or -A flags!)
run md5 -t to get a base line
sysctl hw.setperf=0run md5 -t again
sysctl hw.setperf=100run md5 -t again to compare to the base line.
add this output to your dmesg and mail it to me please
If however you get prepostorous speeds on that line e.g. you have a 2GHz processor and it gives you the option to run at 2800Mhz *DO NOT TOUCH* hw.setperf but send me the dmesg right away. (If this is the case changing hw.setperf in our testing so far is not going to damage your machine but it will probably lock it up!)
Thanks in advance to everyone who tests.
(Comments are closed)