2007-09-02 15:43:58

by colin.michael

[permalink] [raw]
Subject: [patch] enable userspace cpu core voltage control with acpi-cpufreq

please add me as CC to any answear to that post.


Hello,
i want to make a patch known that provides a userspace interface to control the core voltage of a computer processor(s).

Some notes about:
=============================================================
The current version patches acpi-cpufreq.
An older version patched speedstep-centrino and also adds additional built-in frequency/voltage tables to the Linux kernel
for some Pentium-M CPU models.
This is particularly usefull for laptops with broken ACPI that can't use the speedstep-centrino cpufreq driver at all.

The interface is located in SysFS. Some files are read only (for example to read the default values), others
are writeable to set up lower voltages.

The main use of this interface is to lower the core voltage of a laptop's CPU ("undervolt").
The goal is to reduce the laptop's temperature so the cooling fan can safely run at a slower speed.
Another goal of undervolting is to reduce the power consumption of a laptop and thus extend its battery lifetime.

Currently supported processors are Pentium-M (centrino) class CPUs and Core/Core2 CPUs.
Supporting AMD processors is planned and a patch may be available at the end of this year.



An example about the benefits:
=============================================================
My Core2Duo T7200 normally uses 1.2Volt at 2GHz.
The power consumption (measured with intel's PowerTOP) of the system is ~55 Watts at full load (using sprime).

The lowest Voltage i can use without instabilizing the system is 0.9875Volts at 2GHz.
Using this setting the power consumption is reduced to ~40 Watts.

Also the CPU stay cooler depending on the load and speed.


Many peoples with Pentium-M processors reporting they can run the cpu at 0.700Volts. For most of them the CPU fan
never brushes during normal work (also depenting on the load and the system).

=============================================================
Unfortunalely the projects suffers on to few developers.
So if you think this would be interesting you you are welcome to join.

Project located at: https://www.dedigentoo.org/trac/linux-phc/
IRC on freenode: ##linux-phc

Regards
cmichael c dot michael -at- o2online dot de



2007-09-02 22:08:55

by Arjan van de Ven

[permalink] [raw]
Subject: Re: [patch] enable userspace cpu core voltage control with acpi-cpufreq

On Sun, 2 Sep 2007 16:41:32 +0200 (CEST)
<[email protected]> wrote:

> please add me as CC to any answear to that post.
>
>
> Hello,
> i want to make a patch known that provides a userspace interface to
> control the core voltage of a computer processor(s).

(of course doing this scares the bejeezes out of me ;)

One request; can you please make it so that the code marks the kernel
as tainted when such out-of-spec settings are used?
(pick a taint flag, any taint flag, I thought we had one for
overclocking (which is effectively what you're doing) but it seems that
one got removed)...
This way if people get an oops at least it's clear for people that look
at such oopses that something funky is going on, and that they can then
prioritize looking at such an oops accordingly..



Greetings,
Arjan van de Ven

2007-09-03 10:56:23

by Andi Kleen

[permalink] [raw]
Subject: Re: [patch] enable userspace cpu core voltage control with acpi-cpufreq

<[email protected]> writes:

> i want to make a patch known that provides a userspace interface to control the core voltage of a computer processor(s).

That would be essentially linux supported undervolting which
for stability is as bad as overclocking. The problem is that
such games tend to generate weird kernel crashes and then
chew up development issues when kernel hackers have to chase
ghost bugs. I don't think we should support it. Developer
time is too precious.

-Andi

2007-09-03 15:25:29

by Dave Jones

[permalink] [raw]
Subject: Re: [patch] enable userspace cpu core voltage control with acpi-cpufreq

On Mon, Sep 03, 2007 at 12:56:13PM +0200, Andi Kleen wrote:
> <[email protected]> writes:
>
> > i want to make a patch known that provides a userspace interface to control the core voltage of a computer processor(s).
>
> That would be essentially linux supported undervolting which
> for stability is as bad as overclocking. The problem is that
> such games tend to generate weird kernel crashes and then
> chew up development issues when kernel hackers have to chase
> ghost bugs. I don't think we should support it. Developer
> time is too precious.

Seconded. Exactly the same reasons I've refused to merge patches
into cpufreq to allow arbitrary tables to override BIOS tables.
Or patches to remove boundary checks. Even when correctly
implemented, this stuff can be fragile as hell, so introducing
more things that cast doubt over its stability isn't something
I'm keen on at all.

Dave

--
http://www.codemonkey.org.uk

2007-09-04 11:46:04

by Len Brown

[permalink] [raw]
Subject: Re: [patch] enable userspace cpu core voltage control with acpi-cpufreq

On Sunday 02 September 2007 10:41, [email protected] wrote:

> Hello,
> i want to make a patch known that provides a userspace interface to control the core voltage of a computer processor(s).
>
> Some notes about:
> =============================================================
> The current version patches acpi-cpufreq.
> An older version patched speedstep-centrino and also adds additional built-in frequency/voltage tables to the Linux kernel
> for some Pentium-M CPU models.
> This is particularly usefull for laptops with broken ACPI that can't use the speedstep-centrino cpufreq driver at all.
...
> Project located at: https://www.dedigentoo.org/trac/linux-phc/

Please point me to the unfixed bug reports against Linux/ACPI
that justify the existence of linux-phc and I promise to
do my best to fix them. If they do not exist today,
then please file them.

I believe that linux-phc is alarmingly dangerous code
and I'm willing to invest my time to make it unnecessary.

thanks,
-Len

2007-09-09 15:07:29

by Pavel Machek

[permalink] [raw]
Subject: Re: [patch] enable userspace cpu core voltage control with acpi-cpufreq

On Mon 2007-09-03 11:24:57, Dave Jones wrote:
> On Mon, Sep 03, 2007 at 12:56:13PM +0200, Andi Kleen wrote:
> > <[email protected]> writes:
> >
> > > i want to make a patch known that provides a userspace interface to control the core voltage of a computer processor(s).
> >
> > That would be essentially linux supported undervolting which
> > for stability is as bad as overclocking. The problem is that
> > such games tend to generate weird kernel crashes and then
> > chew up development issues when kernel hackers have to chase
> > ghost bugs. I don't think we should support it. Developer
> > time is too precious.
>
> Seconded. Exactly the same reasons I've refused to merge patches
> into cpufreq to allow arbitrary tables to override BIOS tables.
> Or patches to remove boundary checks. Even when correctly
> implemented, this stuff can be fragile as hell, so introducing
> more things that cast doubt over its stability isn't something
> I'm keen on at all.

If it saves 15W out of 55W... I'd say we want that. It should taint
the kernel, but it should be possible.

Heck, people have BIOSen that allow overclocking, and there are
bin-only modules out there. This is not worse than either of those.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2007-09-10 21:05:28

by Pallipadi, Venkatesh

[permalink] [raw]
Subject: RE: [patch] enable userspace cpu core voltage control withacpi-cpufreq



>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Dave Jones
>Sent: Monday, September 03, 2007 8:25 AM
>To: Andi Kleen
>Cc: [email protected]; [email protected]
>Subject: Re: [patch] enable userspace cpu core voltage control
>withacpi-cpufreq
>
>On Mon, Sep 03, 2007 at 12:56:13PM +0200, Andi Kleen wrote:
> > <[email protected]> writes:
> >
> > > i want to make a patch known that provides a userspace
>interface to control the core voltage of a computer processor(s).
> >
> > That would be essentially linux supported undervolting which
> > for stability is as bad as overclocking. The problem is that
> > such games tend to generate weird kernel crashes and then
> > chew up development issues when kernel hackers have to chase
> > ghost bugs. I don't think we should support it. Developer
> > time is too precious.
>
>Seconded. Exactly the same reasons I've refused to merge patches
>into cpufreq to allow arbitrary tables to override BIOS tables.
>Or patches to remove boundary checks. Even when correctly
>implemented, this stuff can be fragile as hell, so introducing
>more things that cast doubt over its stability isn't something
>I'm keen on at all.
>

And acpi-cpufreq does not seem to be the place to be doing this. I would
say it should be a new driver or go into speedstep-centrino which has
similar user defined freq voltage values. Ideally a standalone driver so
that users do not get confused with single driver working in different
modes and distributors can choose not to ship it in case where they do
not like the driver tainting the kernel.

Thanks,
Venki