Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on AMD64
  • Search

ZM-80 100mhzsteps - how?

Have an x86-64 problem? Post here.
Locked
Advanced search
7 posts • Page 1 of 1
Author
Message
molot
Apprentice
Apprentice
User avatar
Posts: 214
Joined: Sat Feb 26, 2005 6:29 pm
Location: Warsaw, Poland
Contact:
Contact molot
Website

ZM-80 100mhzsteps - how?

  • Quote

Post by molot » Thu Sep 11, 2008 6:16 am

Hello.

I have small problem. My cpu is capable of stepping up and down by 100MHz. It is noticed in couinfo (as shown on the bottom of this page), it works in Vista (on the chart with cpu load% and cpu speed %, the second is good outline of the first), it does not in Gentoo. Here I have only 3 states - 500MHz, 1100MHz and 2100MHz. It means that when I need 550MHz to have my tasks done on time, Vista goes 600MHz and Gentoo goes 1100MHz. For a temperature and a battery it is a big difference.

I tried to google it - without success. Does anyone know how to turn that functionality on in Linux? C'mon, we can't be worse ;) And I really don't want to boot Vista just to go longer on battery. It doesn't seem right somehow.

Code: Select all

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 17
model           : 3
model name      : AMD Turion(tm) X2 Ultra Dual-Core Mobile ZM-80
stepping        : 1
cpu MHz         : 500.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch osvw skinit
bogomips        : 4194.51
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 17
model           : 3
model name      : AMD Turion(tm) X2 Ultra Dual-Core Mobile ZM-80
stepping        : 1
cpu MHz         : 2099.128
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch osvw skinit
bogomips        : 4200.40
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
"I just have to run faster than the slowest party member"
Top
loftwyr
l33t
l33t
User avatar
Posts: 970
Joined: Wed Dec 29, 2004 2:51 am
Location: 43°38'23.62"N 79°27'8.60"W

  • Quote

Post by loftwyr » Thu Sep 11, 2008 2:47 pm

The cpu stepping for all AMD processors is run by a driver supplied to the kernel by AMD called powernow. There doesn't seem to be a way (that I've found) to do anything but have it run at what the processor could do, only what the powernow reports. You can see what it reports in dmesg

I have a current processor and it, according to WinXP has a number of frequencies but in Linux has 2.

I have yet to figure out how to make powernow use more than the minumum and maximum frequencies.
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Top
widan
Veteran
Veteran
User avatar
Posts: 1512
Joined: Tue Jun 07, 2005 4:26 pm
Location: Paris, France

Re: ZM-80 100mhzsteps - how?

  • Quote

Post by widan » Thu Sep 11, 2008 6:02 pm

molot wrote:My cpu is capable of stepping up and down by 100MHz.
Actually, the way Powernow works is by having a (small) number of discrete states (usually 3 or 4 for most CPUs) defined in the ACPI tables with their associated FID and VID. This is also what is documented in the CPU datasheets.

I'm guessing that Vista is combining two things: frequency scaling (Powernow) for large changes, and bus throttling (the "T-states" - that don't really change the frequency the CPU runs at, but introduce forced "wait states" every few cycles) for intermediate steps. It then tries to display that in the only way easily understandable by the user, ie a continuously-variable frequency. You can get rmclock and see what's really going on (it shows you the current FID and VID).
molot wrote:It means that when I need 550MHz to have my tasks done on time, Vista goes 600MHz and Gentoo goes 1100MHz. For a temperature and a battery it is a big difference.
Not necessarily (at least for battery life - it will get hotter at 1100 MHz than 600 MHz). Sure the CPU will use more power at 1100 MHz than at 600 MHz, but the task will also take less time to complete. How those two balance each other will determine which state is "better".
loftwyr wrote:There doesn't seem to be a way (that I've found) to do anything but have it run at what the processor could do, only what the powernow reports.
It can be tweaked (though not easily, and certainly not out of the box). There is an Athlon 64 undervolting thread somewhere on the forum, which has some pointers on that (and had links to the needed kernel patch). The states can also be changed by using a custom DSDT (with modified _PSS tables).
Top
molot
Apprentice
Apprentice
User avatar
Posts: 214
Joined: Sat Feb 26, 2005 6:29 pm
Location: Warsaw, Poland
Contact:
Contact molot
Website

Re: ZM-80 100mhzsteps - how?

  • Quote

Post by molot » Thu Sep 11, 2008 7:24 pm

widan wrote:Sure the CPU will use more power at 1100 MHz than at 600 MHz, but the task will also take less time to complete. How those two balance each other will determine which state is "better".
You know - while watching a movie, it'll take exactly, let's say, 1h 40min to complete. No matter if it's 600 or 1100MHz.

I'll test rmclock, but no matter the actual method - the movie sample and other similar tasks uses much less battery under Vista than under Linux, and I hardly can accept it...

Added:Vista requires all drivers to be signed, rmclock requires unsigned driver to be loaded, afair XP can't do all that steps (and I even don't have a partition to install it on). The AMD OverDrive I found was older than my CPU, so useless as well. If there's any other idea how to change values, I'll be glad to do it. Now I just can't find anything that would work... sadly.
widan wrote:There is an Athlon 64 undervolting thread somewhere on the forum, which has some pointers on that (and had links to the needed kernel patch).
I'm using it on my desktop, but it can't change the number of states. It can't give me 2 voltages for one state either. Voltages can be only set at boot time, so no dynamic tweaking. And I believe mobile CPU is around lowest possible voltage for any frequency anyway.

If Vista uses throttling, then why kernel advertises 100mhzsteps in /proc/cpuinfo? I'm not a kernel or hardware guru, so I don't understand why should it need any combinations, if CPU advertises it to be it's built-in feature...
"I just have to run faster than the slowest party member"
Top
loftwyr
l33t
l33t
User avatar
Posts: 970
Joined: Wed Dec 29, 2004 2:51 am
Location: 43°38'23.62"N 79°27'8.60"W

  • Quote

Post by loftwyr » Thu Sep 11, 2008 10:32 pm

Your post motivated me into action to find out what is possible. It seems powernowd (version 1.00 from the website) will take over from the kernel and use 100k steps.

Move the powernowd-0.97. ebuild to your local and rename it to 1.00 and install. run it with powernowd -s 100000 and it seems to work.
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Top
molot
Apprentice
Apprentice
User avatar
Posts: 214
Joined: Sat Feb 26, 2005 6:29 pm
Location: Warsaw, Poland
Contact:
Contact molot
Website

  • Quote

Post by molot » Fri Sep 12, 2008 5:36 am

Thank You loftwyr, I'll check it after work :)
"I just have to run faster than the slowest party member"
Top
molot
Apprentice
Apprentice
User avatar
Posts: 214
Joined: Sat Feb 26, 2005 6:29 pm
Location: Warsaw, Poland
Contact:
Contact molot
Website

  • Quote

Post by molot » Thu Sep 18, 2008 10:14 am

Powernowd does not work. It detects 3 possible steps - just like the built-in kernel governor does. i can force it to use 100MHz steps if I wish, but then the userspace governor comes to play... and it's habit is just to use smallest frequency not less that requested... It means I hardly even gets 500MHz on any core with it, about any action kicks me up to 1100.

Is there any hope? or any way to reverse-engineer how does vista do it? It would be kinda painful to restore to 32bit vista just to test fid and vid tables actually used, but if anyone here can tell me what to do with that info when I'll get it, I might consider doing it.
"I just have to run faster than the slowest party member"
Top
Locked

7 posts • Page 1 of 1

Return to “Gentoo on AMD64”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic