Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Undervolting with kernel 2.6 [Done!]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Sun Feb 05, 2006 10:37 pm    Post subject: Reply with quote

and someone on a desktop amd64 2800+ just reported power savings of 30W between default and undervolted runs
based on the cores and setups involved those savings could be even more significant

his power savings are calculated by measuring his amperage used on 120V side of his line at default and undervolted settings, the difference comes out to about 30W saved

just thought this might be interesting to desktop users
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1127

PostPosted: Tue Feb 07, 2006 2:31 pm    Post subject: Reply with quote

Just a note:

I've tested minimum _stable_ voltage for 2 AMD64 CPUs:

Socket 754 Athlon64 3000+ (Newcastle core) that should run at 1.0GHz @1.1V, 1.8GHz @1.4V and 2.0GHz @1.5V
http://www.aaen.edu.yu/~tnt/newcastle.png

and

Socket 939 Athlon64 3000+ (Winchester core) that should run at 1.0GHz @1.1V and 1.8GHz @1.4V
http://www.aaen.edu.yu/~tnt/winchester.png

( _stable_ voltage means at least 12 hours of prime95 without any kind of error)


So, there is great undervolting potential, at least on AMD low-end CPUs (guess that high-end CPUs are pushed a little bit more to their limits).
_________________
gentoo user
Back to top
View user's profile Send private message
frugal_guy
n00b
n00b


Joined: 15 Jan 2006
Posts: 29
Location: Oregon, USA

PostPosted: Tue Feb 07, 2006 7:25 pm    Post subject: Reply with quote

tnt wrote:
( _stable_ voltage means at least 12 hours of prime95 without any kind of error)


Is there an implementation of prime95 for Gentoo or were these tests done on Windows?

I use burnK7 and memtest+ for testing undervolting and overclocking on Gentoo, but would love to learn
of additional tools for stress testing.
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1127

PostPosted: Wed Feb 08, 2006 12:11 am    Post subject: Reply with quote

sci-mathematics/gimps

http://packages.gentoo.org/search/?sstring=gimps


one (belive it or not) even more stressful test is S&M, but it's window$-only :(

http://testmem.tz.ru/snm.htm
http://testmem.tz.ru/snm.zip
_________________
gentoo user
Back to top
View user's profile Send private message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Wed Feb 08, 2006 5:57 am    Post subject: Reply with quote

emerge cpuburn ; burnK7

yeah, no burmK8 there, still makes your cpu hotter than anything you have seen before, when i really want to turture this i run 2 of those and this:

while ( true ) ; do nbench ; done

nbench actually spits out some numbers, a simple synthetic cpubenchmark, but useful for all sorts of comparisons, like if one were to use the amd64 optimized glibc somewhere here in the forum

800MHz @ 0.9V and 1600MHz @ 1.1V are nice and stable here, and cool :)

meanwhile i attempt adding frequency overrides, which should allow you to void your warranty even more

goal: make my 800/1600MHz laptop at least a 800/1200/1600 laptop
Back to top
View user's profile Send private message
frugal_guy
n00b
n00b


Joined: 15 Jan 2006
Posts: 29
Location: Oregon, USA

PostPosted: Wed Feb 08, 2006 2:10 pm    Post subject: Reply with quote

My system had passed overnight runs with burnK7 and memtest+. It failed within a minute with the mprime torture test. :(

After some tweaking, it passed last night, but now I need to find the exact weak point.
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1127

PostPosted: Wed Feb 08, 2006 3:27 pm    Post subject: Reply with quote

my 5 cents:

mprime and s&m are the best for CPU

memtest86+ and s&m are the best for RAM
_________________
gentoo user
Back to top
View user's profile Send private message
freke
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2003
Posts: 145

PostPosted: Fri Feb 10, 2006 9:06 am    Post subject: Reply with quote

Looking forward to try this on my 4 states turion this weekend - just one question (for a starters :)) the values given at boot-time with powernow-k8.vcore_list=v1,v2,v3...

Would I enter the values in the order dmesg | grep powernow list my states?
Code:
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)
powernow-k8:    0 : fid 0x0 (800MHz), vid 0x12 (1100 mV)
powernow-k8:    1 : fid 0x8 (1600MHz), vid 0xa (1300 mV)
powernow-k8:    2 : fid 0xa (1800MHz), vid 0x6 (1400 mV)
powernow-k8:    3 : fid 0xc (2000MHz), vid 0x2 (1500 mV)


ie. I'd use something like
Code:
powernow-k8.vcore_list=1000,1200,1300,1400
for starting out with?

--
freke
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Fri Feb 10, 2006 12:56 pm    Post subject: Reply with quote

tnt wrote:
I've tested minimum _stable_ voltage for 2 AMD64 CPUs ...

I'm trying with an X2 3800+ (running at 2000 MHz and 1350 mV at stock), and it has been running dual prime95 (one on each core) for close to 10 hours now without problems at 1150mV (it's still running right now). At 1100 mV I got some weird error about one of the prime95 not being able to write a temporary file (the other was still running), but I'm not sure if it's really caused by the low voltage (I was running two prime95 instances from the same directory, maybe they both tried to write to the same temp file at the same time), so I will try again later (or try the intermediate voltage at 1125 mV).

Note that on my board programming CPU voltage to 1150 mV gets something closer to 1170-1180 mV to the CPU (at least that's what lm_sensors tells me), so one 25mV voltage step higher than the programmed value:
Code:
phuket a64-vid # ./a64-vid
...
Current voltage : 0x10 (1150 mV)
phuket a64-vid # sensors
it8712-isa-0290
Adapter: ISA adapter
VCore 1:   +1.17 V  (min =  +1.42 V, max =  +1.57 V)   ALARM
...

Also that CPU (Manchester core, ie dual-core Venice) can't go much lower than that in voltage. Minimum voltage is 1100 mV, and attemps to set a lower voltage fail (the CPU will set 1100 mV instead):
Code:
phuket a64-vid # ./a64-vid 1100
Maximum freq.   : 0x0c (2000 MHz)
Startup freq.   : 0x0c (2000 MHz)
Current freq.   : 0x0c (2000 MHz)

Voltage range   : 0x12 (1100 mV) -> 0x06 (1400 mV)
Startup voltage : 0x08 (1350 mV)
Current voltage : 0x10 (1150 mV)

Target voltage  : 0x12 (1100 mV)
New control MSR : 0x000000010001120c

New voltage     : 0x12 (1100 mV) [SUCCESS]
phuket a64-vid # ./a64-vid 1075
Maximum freq.   : 0x0c (2000 MHz)
Startup freq.   : 0x0c (2000 MHz)
Current freq.   : 0x0c (2000 MHz)

Voltage range   : 0x12 (1100 mV) -> 0x06 (1400 mV)
Startup voltage : 0x08 (1350 mV)
Current voltage : 0x12 (1100 mV)

Target voltage  : 0x13 (1075 mV)
New control MSR : 0x000000010001130c

New voltage     : 0x12 (1100 mV) [FAILURE]


Edit: The CPU passed more than 14 hours with two instances of prime95 at 1150 mV without errors, so I'm trying 1100 mV again (with two instances of prime95 in two separate directories this time, like I did for 1150 mV).

Edit: 1100 mV also works.


Last edited by widan on Sat Feb 11, 2006 12:47 pm; edited 3 times in total
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1127

PostPosted: Fri Feb 10, 2006 1:08 pm    Post subject: Reply with quote

widan wrote:
At 1100 mV I got some weird error about one of the prime95 not being able to write a temporary file (the other was still running), but I'm not sure if it's really caused by the low voltage (I was running two prime95 instances from the same directory, maybe they both tried to write to the same temp file at the same time), so I will try again later (or try the intermediate voltage at 1125 mV).

try emerging gimps and running 2 instances of prime95 with:
Code:
/opt/gimps/mprime -w/tmp/tempdir1
and
/opt/gimps/mprime -w/tmp/tempdir2


widan wrote:
Note that on my board programming CPU voltage to 1150 mV gets something closer to 1170-1180 mV to the CPU (at least that's what lm_sensors tells me), so one 25mV voltage step higher than the programmed value

neither voltage settings nor voltage readings are accurate, so just don't bother about that.

widan wrote:
Also that CPU (Manchester core, ie dual-core Venice) can't go much lower than that in voltage. Minimum voltage is 1100 mV, and attemps to set a lower voltage fail (the CPU will set 1100 mV instead)

never had a chance to test dual-core CPU. try setting fixed multiplier in BIOS (something like 5 to get 1GHz) and set CPU voltage at 0.95 or 1V in BIOS. during this experiment, turn off C'n'Q support in BIOS.
_________________
gentoo user
Back to top
View user's profile Send private message
freke
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2003
Posts: 145

PostPosted: Fri Feb 10, 2006 6:55 pm    Post subject: Reply with quote

I tried manually adding the 2.6.16-rc2.diff to my 2.6.15-r4 gentoo sources, ending up with a
Code:
dmesg | grep powernow
like this;
Code:
Kernel command line: root=/dev/hda3 vga=0x318 powernow-k8.vcore_list=1000,1200,1300,1400
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)
powernow-k8: Requested Voltage for id0 is 1000 mV default voltage is 1100
powernow-k8: Performing required adjustment of 100 mV  or 4 25mV steps
powernow-k8: Requested Voltage for id1 is 1200 mV default voltage is 1300
powernow-k8: Performing required adjustment of 100 mV  or 4 25mV steps
powernow-k8: Requested Voltage for id2 is 1300 mV default voltage is 1400
powernow-k8: Performing required adjustment of 100 mV  or 4 25mV steps
powernow-k8: Requested Voltage for id3 is 1400 mV default voltage is 1500
powernow-k8: Performing required adjustment of 100 mV  or 4 25mV steps
powernow-k8:    0 : fid 0x0 (800 MHz), vid 0x16 (1000 mV)
powernow-k8:    1 : fid 0x8 (1600 MHz), vid 0xe (1200 mV)
powernow-k8:    2 : fid 0xa (1800 MHz), vid 0xa (1300 mV)
powernow-k8:    3 : fid 0xc (2000 MHz), vid 0x6 (1400 mV)
powernow-k8: ignoring illegal change in lo freq table-0 to 0x0
powernow-k8: transition frequency failed


Not sure this is all good - I don't like the two last lines :/ not sure what they actually means as to wether or not it's working?
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Fri Feb 10, 2006 8:06 pm    Post subject: Reply with quote

freke wrote:
Code:
powernow-k8: ignoring illegal change in lo freq table-0 to 0x0
powernow-k8: transition frequency failed

Not sure this is all good - I don't like the two last lines :/ not sure what they actually means as to wether or not it's working?

The message means you're trying to do a frequency transition between two lo-fid states (less than 1400 Mhz), which is forbidden. Normally there is only one lo-fid state (and it is the case in your table, you only have 800 MHz, the next one at 1600 MHz is hi-fid)), so the only valid transition between lo-fid states would be a null transition. And null transitions (when target fid and vid are the same as current fid and vid) are detected and not done.

Only problem is that in your case, it's not completely a null transition, since you changed the voltage of the lo-fid state: you still have same current and target fid, but you have different vid. That means the code that detects null transitions will not trigger (which is good, since you want to do a voltage-only transition), but protection code that disallows lo-lo transitions will trigger (which is not good). It's simply that the powernow driver doesn't know how to do a voltage-only transition (because they never happen in a normal situation).

It should still work after you transition at least once to a different state (even if you transition back to the 800 MHz state later), as the problem only exists at boot (your cpu has the correct fid, but the "wrong" vid). If you go to 1600 MHz (lo-hi transition, which is allowed) then back to 800 MHz (hi-lo, also allowed), you will get 800 MHz at your set voltage of 1000 mV.
tnt wrote:
never had a chance to test dual-core CPU. try setting fixed multiplier in BIOS (something like 5 to get 1GHz) and set CPU voltage at 0.95 or 1V in BIOS. during this experiment, turn off C'n'Q support in BIOS.

I don't really want to go to very low voltages with a rev E CPU (Manchester core is rev E, as is Venice and other recent cores)... There are issues with those about damaged memory controllers when there is too much a difference between Vtt (half Vddr) and Vcore. Normally it happens when you use too high a voltage for the RAM (3V or more, which is used to get better o/c with some kinds of RAM), but I guess it could happen with too low Vcore too.

It's supposed to be safe when abs(Vtt - Vcore) < 0.35 V, so with default 2.5 V Vddr (so 1.25 V Vtt), it is safe for Vcore as low as 0.9 V, but given the price of the CPU, I prefer to leave a little more margin... This might be the reason of the limited vid range btw.
Back to top
View user's profile Send private message
freke
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2003
Posts: 145

PostPosted: Fri Feb 10, 2006 8:54 pm    Post subject: Reply with quote

widan wrote:
freke wrote:
Code:
powernow-k8: ignoring illegal change in lo freq table-0 to 0x0
powernow-k8: transition frequency failed

Not sure this is all good - I don't like the two last lines :/ not sure what they actually means as to wether or not it's working?

The message means you're trying to do a frequency transition between two lo-fid states (less than 1400 Mhz), which is forbidden. Normally there is only one lo-fid state (and it is the case in your table, you only have 800 MHz, the next one at 1600 MHz is hi-fid)), so the only valid transition between lo-fid states would be a null transition. And null transitions (when target fid and vid are the same as current fid and vid) are detected and not done.

Only problem is that in your case, it's not completely a null transition, since you changed the voltage of the lo-fid state: you still have same current and target fid, but you have different vid. That means the code that detects null transitions will not trigger (which is good, since you want to do a voltage-only transition), but protection code that disallows lo-lo transitions will trigger (which is not good). It's simply that the powernow driver doesn't know how to do a voltage-only transition (because they never happen in a normal situation).

It should still work after you transition at least once to a different state (even if you transition back to the 800 MHz state later), as the problem only exists at boot (your cpu has the correct fid, but the "wrong" vid). If you go to 1600 MHz (lo-hi transition, which is allowed) then back to 800 MHz (hi-lo, also allowed), you will get 800 MHz at your set voltage of 1000 mV.


Sounds good :)

Also sounds like I'll do some extensive ./mprime the next few days then to see what my cpu can manage....

This is something that might go into the gentoo-sources at some point in the near future or should I learn to use diff/patch properly today instead of tomorrow :)?
Back to top
View user's profile Send private message
freke
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2003
Posts: 145

PostPosted: Sat Feb 11, 2006 7:23 pm    Post subject: Reply with quote

Initial testing (3hrs mprime on each state) on my AMD 64 Turion 3200+ (most likely the ML37-model) equipped laptop indicates these voltages would be the ones to use
Code:
Kernel command line: root=/dev/hda3 vga=0x318 powernow-k8.vcore_list=1250,1125,1025,850
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)
powernow-k8: Requested Voltage for id0 is 1250 mV default voltage is 1500
powernow-k8: Performing required adjustment of 250 mV  or 10 25mV steps
powernow-k8: Requested Voltage for id1 is 1125 mV default voltage is 1400
powernow-k8: Performing required adjustment of 275 mV  or 11 25mV steps
powernow-k8: Requested Voltage for id2 is 1025 mV default voltage is 1300
powernow-k8: Performing required adjustment of 275 mV  or 11 25mV steps
powernow-k8: Requested Voltage for id3 is 850 mV default voltage is 1100
powernow-k8: Performing required adjustment of 250 mV  or 10 25mV steps
powernow-k8:    0 : fid 0xc (2000 MHz), vid 0xc (1250 mV)
powernow-k8:    1 : fid 0xa (1800 MHz), vid 0x11 (1125 mV)
powernow-k8:    2 : fid 0x8 (1600 MHz), vid 0x15 (1025 mV)
powernow-k8:    3 : fid 0x0 (800 MHz), vid 0x1c (850 mV)
powernow-k8: ignoring illegal change in lo freq table-0 to 0x0
powernow-k8: transition frequency failed


Some may notice that my states are suddenly in reversed order as opposed to my earlier posts - fixing the DSDT caused this...

Doing 12hrs run on each state first thing after the weekend.

EDIT: Those settings were good until I started unplugging the AC-adapter, seems like that has a minor (but absolutely not an ignorable) impact on the voltage.... had to tweak my settings to 1275,1150,1075,875


Last edited by freke on Sun Feb 12, 2006 9:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sun Feb 12, 2006 1:40 am    Post subject: Reply with quote

morfic wrote:
forgot to add, 1.45V@1600Mhz means 90C compiles
while 1.1V@1600MHz mean 60C compiles

I can confirm the impressive temperature decrease. Tried it on my old Newcastle 3000+ (s754) too, running at 1225 mV (instead of 1500 mV) at 2000 MHz, and temperatures decreased by nearly 10 degrees (cooling was the same at all voltages, ie not a lot, and I set a fixed fan speed for the test, which I didn't do when I tried on the X2)...

This isn't really surprising, given the fact that effective power consumption is proportional to frequency, and proportional to the square of voltage, so a voltage drop will be very effective at reducing power. Also the power/temperature increase ratio is nearly constant from my measurements.
Code:
Voltage   T°    Delta  TDP   Ratio  Pwr ratio
--------- ----- ------ ----- ------ ---------
1500 mV   54 C  29 C   89 W  0.33   100%
1450 mV   51 C  26 C   83 W  0.31   93%
1400 mV   49 C  24 C   78 W  0.30   88%
1350 mV   48 C  23 C   72 W  0.31   81%
1300 mV   46 C  21 C   67 W  0.31   75%
1275 mV   46 C  21 C   64 W  0.33   72%
1250 mV   45 C  20 C   62 W  0.32   70%
1225 mV   45 C  20 C   59 W  0.34   66%

Delta is CPU temperature minus room temperature (almost 25 C in my room - 3 machines are running in there at all times...), TDP is computed power for the given frequency/voltage point, and ratio is the ratio of temp delta to power (to check that it is indeed nearly constant). Pwr ratio is the percentage of power used wrt stock voltage.

I did the power calculations based on the official TDP for that CPU (89W), because I don't know what the real power is at stock voltage (there are higher clocked CPUs with the same core with the same official TDP, so I guess the real power is somewhat lower).

For your Turion, assuming 20 C room temperature, you have a delta of 70 C at stock, and since power (and temperature) scales with square of voltage ratio, that means a delta at your low voltage of 70 * (1.1/1.45)^2 = 40 C, which means 60 C real CPU temperature, so it matches the theory.
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sun Feb 12, 2006 1:43 pm    Post subject: Reply with quote

When testing for stability, also look in dmesg for those messages:
Code:
Machine check events logged

I got those while running tests at 1000 Mhz near the bottom end of the voltage scale (800-850 mV) on the 3000+. Dumping the stored machine check registers with mcelog results in that (only copied one set, but there were several nearly identical ones):
Code:
MCE 0
CPU 0 0 data cache TSC 8e568d74745c
ADDR 189b7980
  Data cache ECC error (syndrome e6)
       bit46 = corrected ecc error
       bit62 = error overflow (multiple errors)
  memory/cache error 'data read mem transaction, data transaction, level 2'
STATUS d473400000000136 MCGSTATUS 0
MCE 1
CPU 0 1 instruction cache TSC 8e568d747a1a
ADDR 2aaaaad5d990
       bit62 = error overflow (multiple errors)
  memory/cache error 'instruction fetch mem transaction, instruction transaction, level 1'
STATUS d400000000000151 MCGSTATUS 0
MCE 2
CPU 0 2 bus unit TSC 8e568d747be1
ADDR 1da56080
  L2 cache ECC error
  Bus or cache array error
       bit46 = corrected ecc error
       bit62 = error overflow (multiple errors)
  memory/cache error 'evict mem transaction, generic transaction, level 2'
STATUS d40040000000017a MCGSTATUS 0

To simplify, it seems the L2 cache did not like the low voltage that much. Prime95 was still running without problems at the time. It didn't cause problems because the L2 is ECC protected on Athlon 64, but I don't want to rely on ECC to have a machine work normally.

Setting the voltage to 900 mV has made the MCEs dissapear so far.

Also temperature gain at the low frequencies is much less impressive that at higher frequencies, so it might not be necessary to change voltages for the lower power states on desktop machines (you might still gain battery life on laptops though, so it can be worth it for those):
Code:
Voltage   T°    Delta  TDP   Ratio   Pwr ratio
--------- ----- ------ ----- ------- ----------
1100 mV   37 C  12 C   24 W  0.50    27%
1050 mV   37 C  12 C   22 W  0.55    25%
1000 mV   36 C  11 C   20 W  0.55    22%
 950 mV   36 C  11 C   18 W  0.61    20%
 900 mV   35 C  10 C   16 W  0.63    18%
 850 mV   35 C  10 C   14 W  0.71    16%
 800 mV   35 C  10 C   13 W  0.77    15%

It seems the delta/power ratio is not really constant at really low power (it seems to be when you have some significant power though). Maybe the heatsink is not that efficient at low powers ?
Back to top
View user's profile Send private message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Sat Feb 18, 2006 4:11 am    Post subject: Reply with quote

Indeed the transition from low-fid to low-fid are what are causing the two lines in question, what keeps me from actualy indeed overwriting the frequencies is the fact the get reread from acpi at another point, that code i plan on adding a acpi_freq_overide=1|0 and then if/else the part where it resests the fid to what it reads from hardware, and that part i want to carefully test, not risking my laptop in the process, at that point the errors seen when using more than the available frequencies (or even different when same quantity) should go away

if anyone wants to have a stab at acpi-cpufreq.c before me, go for it, add the moduleparam.h as in powernow-k8.c, and add a module_param() much like in powernow-k8 (there we use an array since we have more than one value), i hope this weekend to be the weekend to get to it myself

i like to see that the temp changes do benefit others, and i hope everyone uses it in a sensible way, so noone loses their hardware

once i can set a different frequency than what bios dictates (or better yet, more intermediate steps) ill update the link to the patch

just giving a little status on this, thought might help to know i have not stopped on this just yet
Back to top
View user's profile Send private message
brihall
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 86
Location: Colorado, USA

PostPosted: Thu Feb 23, 2006 9:59 pm    Post subject: Reply with quote

Would it be possible to extend the kernel patch to allow providing a set of frequencies (or the equivalent) as well as voltages?
If not, how about an option to _not_ change the CPU frequency.

The use of this is not powersaving, but overclocking. For instance, my Asrock 939Dual-Sata2 only allows a max Vcore of 1.4V with my Opteron 165. Using the patched powernow-k8, I could set the voltage to 1.55V, but in this case I wouldn't want powernow to decrease the clock by changing state when inserting the module.
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1127

PostPosted: Thu Feb 23, 2006 10:16 pm    Post subject: Reply with quote

just use 'performance' governor
_________________
gentoo user
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Thu Feb 23, 2006 10:37 pm    Post subject: Reply with quote

brihall wrote:
For instance, my Asrock 939Dual-Sata2 only allows a max Vcore of 1.4V with my Opteron 165. Using the patched powernow-k8, I could set the voltage to 1.55V

Not necessarily. If you look at my post above with the X2, you will see it has a limited range of valid VIDs (1100 to 1400 mV). Your Opteron probably has the same limits, and if it's the case, the CPU will refuse the "forbidden" voltage, and either do nothing, or switch to the maximum allowed (ie 1400 mV).

Some motherboards may be able to go higher by forcing the values of VID pins on the VRM controller chip (overriding what the CPU indicates), or by inserting an offset (like +100 mV or +5% or whatever) in the voltage regulation, but both of those need specific hardware. If your motherboard can't do it, there's no way to do it in software.

If you want to know if your CPU has limits (and try to change the voltage directly if you want), get this program and compile it. Then you can get your CPU capabilites (min and max vid on the "Voltage range" line):
Code:
phuket a64-vid # ./a64-vid
Maximum freq.   : 0x0c (2000 MHz)
Startup freq.   : 0x0c (2000 MHz)
Current freq.   : 0x0c (2000 MHz)

Voltage range   : 0x12 (1100 mV) -> 0x06 (1400 mV)
Startup voltage : 0x08 (1350 mV)
Current voltage : 0x12 (1100 mV)

Or try to change voltage (just specify voltage in millivolts, here 1350 mV - just be careful, as the program doesn't check the validity of the VID resulting from the conversion from the voltage you specify - and only voltages between 800 and 1550 mV can be encoded to a VID):
Code:
phuket a64-vid # ./a64-vid 1350
Maximum freq.   : 0x0c (2000 MHz)
Startup freq.   : 0x0c (2000 MHz)
Current freq.   : 0x0c (2000 MHz)

Voltage range   : 0x12 (1100 mV) -> 0x06 (1400 mV)
Startup voltage : 0x08 (1350 mV)
Current voltage : 0x12 (1100 mV)

Target voltage  : 0x08 (1350 mV)
New control MSR : 0x000000010001080c

New voltage     : 0x08 (1350 mV) [SUCCESS]

Be careful though, the code has not been tested much (it works on my two A64 machines, but I didn't test all the weird cases). Also, my program talks directly to the CPU (it writes to the MSR that controls FID/VID changes), so the powernow driver (if loaded) won't really understand what has happened if you try to change frequencies later (it will say something is out of sync in dmesg).
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Fri Feb 24, 2006 2:30 am    Post subject: Reply with quote

The AsRock motherboard has the capability of running a 1.55 vcore, but it imposes a BIOS limit. If powernow-k8 is bypassing the BIOS then is possible that you can set the vcore to anything the VRM is capable of.


I have a question about my Turion laptop.
In Windows I see atleast 4 steps.
800 Mhz(lowest)
1000 MHz
1.6 GHz
1.8 GHz(highest)

While in Linux it only reads these 3 settings.
800
1600
1800
It sits at 1600 most of the time, goes to 1800 when it needs it, and I don't think I've ever seen it go down to 800 unless I set it to userspace and manually put it at 800. Is there something different that needs to be done?
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Fri Feb 24, 2006 2:51 am    Post subject: Reply with quote

NewBlackDak wrote:
The AsRock motherboard has the capability of running a 1.55 vcore, but it imposes a BIOS limit.

It can be a CPU limit too. Some recent CPUs have a limited VID range (look at my post above). If the BIOS changes the Vcore by setting the VID in the CPU (rather than talking directly to the VRM), it will be limited by what the CPU accepts. Motherboards designed for overclockers may have ways to bypass the CPU limitation, but I doubt an Asrock board would have such things (they're not designed for overclocking usually).
NewBlackDak wrote:
In Windows I see atleast 4 steps.
800 Mhz(lowest)
1000 MHz
1.6 GHz
1.8 GHz(highest)

You can't have both 800 and 1000 MHz normally (only one entry below 1400 MHz is allowed). Here are the rules (from powernow-k8.h, but you can probably find them in the BIOS developer guide):
Code:
/*
 * There are restrictions frequencies have to follow:
 * - only 1 entry in the low fid table ( <=1.4GHz )
 * - lowest entry in the high fid table must be >= 2 * the entry in the
 *   low fid table
 * - lowest entry in the high fid table must be a <= 200MHz + 2 * the entry
 *   in the low fid table
 * - the parts can only step at 200 MHz intervals, so 1.9 GHz is never valid
 * - lowest frequency must be >= interprocessor hypertransport link speed
 *   (only applies to MP systems obviously)
 */

Then again, you might have a frequency table that violates that rule (I think Linux just ignores the bad frequency, but you should have a warning message in dmesg).
NewBlackDak wrote:
I don't think I've ever seen it go down to 800 unless I set it to userspace and manually put it at 800.

Do you have something constantly running and using CPU ? Normally the ondemand governor will drop it to minimum frequency when idle.
Back to top
View user's profile Send private message
vyzivus
Apprentice
Apprentice


Joined: 05 Jul 2004
Posts: 173
Location: Slovakia

PostPosted: Fri Feb 24, 2006 12:11 pm    Post subject: Reply with quote

morfic wrote:
patch kernel 2.6.16-rc2 (only tested on vanilla) with this patch: http://dev.gentoo.org/~morfic/powernow-k8-vcore_list-2.6.16-rc2.diff

Many thanks for this patch, I'm going to test it in the evening. I'd really love to see this patch in the gentoo-sources, is there any chance for this patch to get there?
_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes or should I?
Back to top
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 136
Location: Europe/Vienna

PostPosted: Fri Feb 24, 2006 5:31 pm    Post subject: Reply with quote

i tried this patch today on gentoo-sources-2.6.15-rc3 but the instant i try some governor different from performance the system locks up.

i have a tyan k8w w dual opteron 246. was that patch ever tried on a dual cpu system (not dual core)?

edit: but the modification works. even permanently at 2ghz under full load they stay at about 31-33 instead of 40-42 degrees!!
_________________
bill who? micro what?
Back to top
View user's profile Send private message
vyzivus
Apprentice
Apprentice


Joined: 05 Jul 2004
Posts: 173
Location: Slovakia

PostPosted: Fri Feb 24, 2006 7:22 pm    Post subject: Reply with quote

Many thanks for the patch and for all your hints, guys. Now I finally have a quiet notebook :)
Code:
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.4)
powernow-k8: Requested Voltage for id0 is 1175 mV default voltage is 1500
powernow-k8: Performing required adjustment of 325 mV  or 13 25mV steps
powernow-k8: Requested Voltage for id1 is 1075 mV default voltage is 1400
powernow-k8: Performing required adjustment of 325 mV  or 13 25mV steps
powernow-k8: Requested Voltage for id2 is 800 mV default voltage is 1100
powernow-k8: Performing required adjustment of 300 mV  or 12 25mV steps
powernow-k8:    0 : fid 0xa (1800 MHz), vid 0xf (1175 mV)
powernow-k8:    1 : fid 0x8 (1600 MHz), vid 0x13 (1075 mV)
powernow-k8:    2 : fid 0x0 (800 MHz), vid 0x1e (800 mV)
powernow-k8: ph2 null fid transition 0xa

/proc/cpuinfo:
Code:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 4
model name      : AMD Athlon(tm) 64 Processor 3000+
stepping        : 8
cpu MHz         : 1794.966
cache size      : 1024 KB
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 syscall nx mmxext lm 3dnowext 3dnow
bogomips        : 3596.33
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

Now waiting for mprime -t to finish, hope the processor'll work ok.
_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes or should I?
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, 8  Next
Page 2 of 8

 
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