OpenBSD Journal

PowerNow testing needed.

Contributed by jj on from the power-is-cool dept.

As gwk@ mentioned in the MP setperf for amd64 message he has been working on improving our support for powernow on amd64 processors.

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 MHz
in 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=0
run md5 -t again
sysctl hw.setperf=100
run 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.
gwk

(Comments are closed)


Comments
  1. By Adam Petaccia (152.13.55.86) on http://mighmos.org

    I must confess, I'm currently kind of Linux right now, but still like to keep up with openBSD due to the fact that I personally think that you guys have got to be the _coolest_ OS out there (and I admire all the work you guys do).

    Lack of powernow on Linux may be what pushes me to run openBSD on more than just a few bits of old hardware. I'll give it a shot when my new hard drive gets here, and let you guys know how it goes.

    Cheers!

    PS: Please don't flame me.

    Comments
    1. Comments
      1. By phessler (209.204.157.105) on

        > PS: Please don't flame me.
        > what do you mean "Lack of powernow on Linux"?
        > http://gentoo-wiki.com/HOWTO_PowerNow

        OpenBSD's PowerNow HOWTO:
        Step 1) run `apmd -C`
        Step 2) enable `apmd -C` in /etc/rc.conf.local

        DONE.

        Comments
        1. By sthen (85.158.44.148) on

          > > PS: Please don't flame me.
          > > what do you mean "Lack of powernow on Linux"?
          > > http://gentoo-wiki.com/HOWTO_PowerNow
          >
          > OpenBSD's PowerNow HOWTO:
          > Step 1) run `apmd -C`
          > Step 2) enable `apmd -C` in /etc/rc.conf.local
          >
          > DONE.

          Step 3) [optional] run 'systat sensors' and see what happens to Vcore and temperatures at different workloads :-)

      2. By Adam Petaccia (152.13.55.86) on

        > PS: Please don't flame me.
        > what do you mean "Lack of powernow on Linux"?
        > http://gentoo-wiki.com/HOWTO_PowerNow

        I meant that my motherboard (?) lacks the PSB object, and as a result, my processor will never throttle down.

        Comments
        1. By Anonymous Coward (81.96.206.228) on

          > I meant that my motherboard (?) lacks the PSB object, and as a result, my processor will never throttle down.

          If
          cat /proc/acpi/processor/CPU1/throttling
          shows up something then you can do CPU throttling. Powernow lets you do CPU _scaling_ (which Linux can do too) ...

          What I really want to see is OpenBSD VIA C3 support for all this powersaving greatness, coupled with WoL and reliable hibernate...

  2. By Ray Percival (sng) on http://undeadly.org/cgi?action=search&sort=time&query=sng

    Patch installed and compiled great on a 4.1 -stable box. Initial testing looks good. Didn't have time to pull a proper dmesg before having to come to work but will get it this evening. Thanks for all the code.

  3. By Anonymous Coward (207.148.178.250) on

    What can we apply this diff to -> 3.9, 4.0, 4.1 -current only?

    Comments
    1. By phessler (209.204.157.105) on

      > What can we apply this diff to -> 3.9, 4.0, 4.1 -current only?

      the diff is intended for -current, but your mileage may vary.

      Comments
      1. By Ray Percival (sng) on http://undeadly.org/cgi?action=search&sort=time&query=sng

        > > What can we apply this diff to -> 3.9, 4.0, 4.1 -current only?
        >
        > the diff is intended for -current, but your mileage may vary.

        http://serenity.scarynetworkguy.net:8084/dmesg.txt

        In case anybody is curious.

  4. By Timo Schoeler (eclipser) timo@riscworks.net on http://riscworks.net

    Hi,

    just built fresh from -current source:

    cpu0 at mainbus0: (uniprocessor)
    cpu0: AMD Athlon(tm) 64 Processor 3500+, 2204.93 MHz
    cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
    cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
    64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 8
    4MB entries fully associative cpu0: DTLB 32 4KB entries fully
    associative, 8 4MB entries fully associative

    cpu0: PowerNow! K8 2204 MHz: speeds: 2200 2000 1800 1000 MHz

    (This Athlon64 is a 3500+ EE SFF, at 35W max ;)

    Thanks for the good work, I appreciate it very much!

  5. By Anonymous Coward (216.14.198.50) on

    Wonderful to see this functionality coming of age in OpenBSD, I've found athcool to work well under Linux, though only on the older athlonxp cpus and on motherboards with the right chipsets.

    I rate powersaving under openbsd to be more important than under linux, as the only system I have on 24/7 is an openbsd system, doing the most essential internet facing, and security critical functions. Its chugging along on the previous generation AMD hardware ( actually Nextgen, who developed what become the K6 ), so its a delight to know that my planned upgrade path to openbsd on athlon64/opteron kit will be both rock solid and frugal on the wattage.

    Comments
    1. By Timo Schoeler (eclipser) timo@riscworks.net on http://riscworks.net

      > Wonderful to see this functionality coming of age in OpenBSD, I've found > athcool to work well under Linux, though only on the older athlonxp cpus > and on motherboards with the right chipsets.
      >
      > I rate powersaving under openbsd to be more important than under linux, > as the only system I have on 24/7 is an openbsd system, doing the most
      > essential internet facing, and security critical functions. Its chugging > along on the previous generation AMD hardware ( actually Nextgen, who
      > developed what become the K6 ), so its a delight to know that my planned > upgrade path to openbsd on athlon64/opteron kit will be both rock solid > and frugal on the wattage.

      My AMD64 system (besides my ThinkPad the only x86/amd64 system I own -- the rest is MIPS, SPARC{64}, PowerPC/Power etc.) acts as my 'home server' serving data, caring for backups (via rsync/rsnapshot), SMTP, IMAP and small backup web server, among other tiny tasks. I built it to be extremely power preserving while not being on a C3-level performance-wise. It's got an AMD Athlon64 3500+ EE SFF (SFF -> Small Form Factor) with, as mentioned, 35 Watt peak power drawing. The system furthermore consists of an Asus mainboard (nVidia Chipset), an additional intel fxp NIC (to have useable Ethernet), an additional Promise SATAII controller (failover), two WD Caviar RE HDs, 2x 512MByte Kingston ECC DDR2 RAM, and a DVD-Recorder and DVD-RAM drive. Not to forget a _decent_ PSU.

      Sitting idle 99% of the day this machine draws an awesome amount of 55 Watts and can be heard only of it's very quite in the room and you listen to it carefully! :)

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]