All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver
@ 2003-10-21  2:56 ` Pallipadi, Venkatesh
  0 siblings, 0 replies; 29+ messages in thread
From: Pallipadi, Venkatesh @ 2003-10-21  2:56 UTC (permalink / raw)
  To: cpufreq, linux-kernel, linux-acpi
  Cc: Nakajima, Jun, Mallick, Asit K, Dominik Brodowski


Hi,

Most of the latest CPUs (laptop CPUs in particular) have feature 
which enable very low latency P-state transitions 
(like Enhanced Speedstep Technology-EST). Using this feature, 
we can have a lightweight in kernel cpufreq governor, 
to vary CPU frequency depending on the CPU usage. The 
advantage being low power consumption and also cooler laptops.

Another related change is enhancing the current ACPI P-state 
driver to handle:
EST (and MSR based P-state transitions), make the driver SMP 
aware and introduce HT coordination in the driver (HT siblings 
share the same CPU frequency).

The patches that follow this mail addresses the above issues. 
They are against 2.6-test7 kernel. Many thanks to Dominik for 
his comments and suggestions.

The patches will work on all laptops with EST technology 
(Centrino) and also on any other system that supports low 
latency frequency change. 

Reviews/testing of patches are most welcome.

Thanks,
-Venkatesh


Patches are split as follows:

Patch 1/3: Changes to ACPI P-state driver, to handle MSR 
based transitions frequency transitions and make the driver 
SMP aware.

Patch 2/3: Introduce HT-synchronization in the ACPI P-state 
Driver, to take care of shared CPU frequency between HT siblings.

Patch 3/3: New dynamic cpufreq driver (called 
DemandBasedSwitch driver), which periodically monitors CPU 
usage and changes the CPU frequency based on the demand.

^ permalink raw reply	[flat|nested] 29+ messages in thread
* RE: [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver
@ 2003-10-22  1:42 ` Pallipadi, Venkatesh
  0 siblings, 0 replies; 29+ messages in thread
From: Pallipadi, Venkatesh @ 2003-10-22  1:42 UTC (permalink / raw)
  To: Måns Rullgård, linux-kernel; +Cc: cpufreq



> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org 
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Måns Rullgård
> 
> So, how does this work?  I'd like to be able to set minimum and
> maximum clock frequencies to allow, and CPU utilization thresholds at
> which to switch frequencies.  Is that possible, or is it work yet to
> be done?  Adjustable polling interval would also be nice.
> 

Yes. You can set the maximum and minimum allowed frequencies using 
the standard cpufreq interface. Something like:
echo 800000 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

However, other interfaces to tune this particular governor is not 
there yet. Other tunables that will be exported to user in future are 
Polling interval and CPU utilization thresholds.

> > The patches will work on all laptops with EST technology 
> > (Centrino) and also on any other system that supports low 
> > latency frequency change. 
> 
> Does Pentium 4 M work?

AFAIK, P4M does not support EST. You can double check with 
/proc/cpuinfo and look out for EST flag.


Thanks,
-Venkatesh

^ permalink raw reply	[flat|nested] 29+ messages in thread
* RE: [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver
@ 2003-10-22  1:48 ` Pallipadi, Venkatesh
  0 siblings, 0 replies; 29+ messages in thread
From: Pallipadi, Venkatesh @ 2003-10-22  1:48 UTC (permalink / raw)
  To: Alexander Bokovoy, M?ns Rullg?rd; +Cc: cpufreq, linux-kernel



> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org 
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
> Alexander Bokovoy
> Sent: Tuesday, October 21, 2003 2:11 PM
> To: M?ns Rullg?rd
> Cc: cpufreq@www.linux.org.uk; linux-kernel@vger.kernel.org
> Subject: Re: [PATCHSET] 0/3 Dynamic cpufreq governor and 
> updates to ACPI P-state driver
> 
> 
> On Tue, Oct 21, 2003 at 10:39:16PM +0200, M?ns Rullg?rd wrote:
> > Alexander Bokovoy <ab@altlinux.org> writes:
> > 
> > >> > Most of the latest CPUs (laptop CPUs in particular) 
> have feature 
> > >> > which enable very low latency P-state transitions 
> > >> > (like Enhanced Speedstep Technology-EST). Using this feature, 
> > >> > we can have a lightweight in kernel cpufreq governor, 
> > >> > to vary CPU frequency depending on the CPU usage. The 
> > >> > advantage being low power consumption and also cooler laptops.
> > >> 
> > >> So, I took this thing for a spin, but it didn't work at 
> all.  I loaded
> > >> the module, and did "echo demandbased > 
> /sys/.../scaling_governor".
> > >> This echo never returned, and the keyboard locked up.  
> After a little
> > >> while, the fan started running at full speed.  I managed 
> to cut and
> > >> paste into an xterm and start top, which showed nothing 
> unusual.  I
> > >> could shut down and reboot normally.
> > > I applied these patches to stock 2.6.0-test8 and selected 
> 'demandbased' as
> > > default governor. In result, everything worked from the 
> very beginning, my
> > > Centrino-based system went to 600MHz and was upping when 
> load was going
> > > higher during compilation or disk access but went down 
> when load was
> > > lowering. So it works well for me.
> > 
> > What's your /proc/cpuinfo?  Mine says
> > 
> > processor	: 0
> > vendor_id	: GenuineIntel
> > cpu family	: 15
> > model		: 2
> > model name	: Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz


AFAIK, Pentium 4 M does not support EST (Frequency transitions with low
latency). 
But that doesn't explain why it is hanging though. Which speedstep
driver are you using?
P4-clockmod? Or acpi? Can you send the complete dmesg.


Thanks,
-Venkatesh

^ permalink raw reply	[flat|nested] 29+ messages in thread
* RE: [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver
@ 2003-10-22 18:21 Pallipadi, Venkatesh
  2003-10-23  8:19 ` Arjan van de Ven
  2003-11-02 20:28 ` Jan Rychter
  0 siblings, 2 replies; 29+ messages in thread
From: Pallipadi, Venkatesh @ 2003-10-22 18:21 UTC (permalink / raw)
  To: Mukesh Rajan; +Cc: linux-acpilinux-acpi, cpufreq, linux-kernel

 
Hi,
 
I do not have any performance numbers taken from actual probes. 
We have seen in our testing that the the frequency does change based on
the cpu usage.
For example, on a Centrino system, 
- frequency will be lowest when system is idle 
- frequency will be somewhere in the mid-range when you run single app
like mp3/mpeg player
- frequency will be maximum when you run multiple apps 
And with the kind of power savings that comes with these frequency
changes, this behaviour 
results in  longer battery life. However, as yet I do not have any
numbers to quantify this gain, 
mainly because I do not have any setup where I can measure actual power.
 
Thanks,
-Venkatesh  
 

	-----Original Message-----
	From: Mukesh Rajan [mailto:megabyte1024@hotmail.com] 
	Sent: Tuesday, October 21, 2003 4:18 PM
	To: Pallipadi, Venkatesh
	Cc: cpufreq@www.linux.org.uk; linux-kernel@vger.kernel.org;
linux-acpilinux-acpi@intel.com
	Subject: [PATCHSET] 0/3 Dynamic cpufreq governor and updates to
ACPI P-state driver
	
	
	Hii,

	I was wondering if you had any numbers (physical measurements)
proving the same. Over an year ago, I had implemented the same idea on a
Compaq IPAQ (Strong ARM based running ARM Linux). I initially had to fix
the CPU freq code which was broken to get everything working right. But
after all the trouble, with actual probes (NI-DAQ board doing voltage
sampling et al) I measured very little savings in power at all. I
attributed those observations to questionable load average calculations
and very small power savings margin and simply moved on.

	~ Mukesh 

	(Please cc: as I am not in list)

	Hi,

	Most of the latest CPUs (laptop CPUs in particular) have feature


	which enable very low latency P-state transitions 

	(like Enhanced Speedstep Technology-EST). Using this feature, 

	we can have a lightweight in kernel cpufreq governor, 

	to vary CPU frequency depending on the CPU usage. The 

	advantage being low power consumption and also cooler laptops.

	Another related change is enhancing the current ACPI P-state 

	driver to handle:

	EST (and MSR based P-state transitions), make the driver SMP 

	aware and introduce HT coordination in the driver (HT siblings 

	share the same CPU frequency).

	The patches that follow this mail addresses the above issues. 

	They are against 2.6-test7 kernel. Many thanks to Dominik for 

	his comments and suggestions.

	The patches will work on all laptops with EST technology 

	(Centrino) and also on any other system that supports low 

	latency frequency change. 

	Reviews/testing of patches are most welcome.

	Thanks,

	-Venkatesh


  _____  

	Surf and talk on the phone at the same time with broadband
Internet access. Get high-speed for as low as $29.95/month.* 
	<http://g.msn.com/8HMAENUS/2731??PS=> *Depending on the local
service providers in your area. 

^ permalink raw reply	[flat|nested] 29+ messages in thread
* RE: [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver
@ 2003-11-04  3:14 Brown, Len
  2003-11-04  3:21 ` Jan Rychter
  0 siblings, 1 reply; 29+ messages in thread
From: Brown, Len @ 2003-11-04  3:14 UTC (permalink / raw)
  To: Jan Rychter, Pallipadi, Venkatesh; +Cc: Mukesh Rajan, cpufreq, linux-acpi


> I have done some measurements on a Toshiba S7/290LNKW,
> which has a 900MHz Pentium-M. The results have been posted to 
> this list a while ago -- the most surprising one being that the 
> Pentium-M in that machine seemed to always consume the same
> amount of power when idle, independent of operating frequency.
> The frequency only made a difference
> when the CPU was actually doing something (or when I made it 
> not use the C3 state by loading usb-uhci).

Probably the cpu is running HLT in the idle loop,
so the power consumption there would not vary with MHz.

Cheers,
-Len

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver
@ 2003-11-05 21:12 Mukesh Rajan
  0 siblings, 0 replies; 29+ messages in thread
From: Mukesh Rajan @ 2003-11-05 21:12 UTC (permalink / raw)
  To: linux, jan, venkatesh.pallipadi, len.brown; +Cc: cpufreq, linux-acpi

>> one processor, this theory isn't true for all processors. And dynamic
>> power management should work best _for all processors_.

This is too much of a generalization. By simply reducing the frequency
there only will be reduction in instantaneous power consumed by the
processor. There is no arguing that. But objective is to save energy.
Whether there will be energy savings or not, does not depend much on
processor, but _also_ on the underlying OS, the scheduler, the nature of
application etc etc or in other words the system as a whole.

I think i did see some good numbers in the past for mpeg decoder on XScale
patform with eCOS (static scheduling). But on arm-linux on an IPAQ I saw
nothing when I tried varying the processor voltage with load changes.
Maybe my modeling of load, frequency selection algorithm were not sound
enough, I dunno. I did'nt work on that project long enough.

Comments like "Noted that frequency changed" and "date sheet said so and
so" are not much convincing as actual numbers would.

Regards,
Mukesh


On Mon, Nov 03, 2003 at 07:21:34PM -0800, Jan Rychter wrote:
> >>>>> "Len" == Len Brown writes:
>  >> I have done some measurements on a Toshiba S7/290LNKW, which has a
>  >> 900MHz Pentium-M. The results have been posted to this list a while
>  >> ago -- the most surprising one being that the Pentium-M in that
>  >> machine seemed to always consume the same amount of power when idle,
>  >> independent of operating frequency.  The frequency only made a
>  >> difference when the CPU was actually doing something (or when I made
>  >> it not use the C3 state by loading usb-uhci).
> 
>  Len> Probably the cpu is running HLT in the idle loop, so the power
>  Len> consumption there would not vary with MHz.
> 
> Oh -- well, that's exactly what I wanted to check. It seems it does vary
> for speedstepped Pentium-III Mobile, according to my measurements,
> that's why I was surprised.
> 
> This should influence the design of dynamic power management -- if the
> CPU is already idle, there is no point in slowing it down. It only makes
> sense to change the frequency when we're actually doing something.

This assumption is at least partly wrong. Pentium-III Mobile datasheets
clearly show that the power usage when doing nothing varies up to 50%
dependand on the frequency setting. So even if it is no measurable effect
on
one processor, this theory isn't true for all processors. And dynamic
power management should work best _for all processors_.

	Dominik

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2003-11-05 21:12 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21  2:56 [PATCHSET] 0/3 Dynamic cpufreq governor and updates to ACPI P-state driver Pallipadi, Venkatesh
2003-10-21  2:56 ` Pallipadi, Venkatesh
2003-10-21  8:25 ` Måns Rullgård
2003-10-21  8:25   ` Måns Rullgård
2003-10-21 20:47   ` Dominik Brodowski
2003-10-21 10:57 ` Måns Rullgård
2003-10-21 11:09   ` Måns Rullgård
2003-10-21 20:30   ` Alexander Bokovoy
2003-10-21 20:39     ` Måns Rullgård
2003-10-21 21:11       ` Alexander Bokovoy
2003-10-21 21:37         ` Måns Rullgård
2003-10-21 21:53           ` Alexander Bokovoy
2003-10-21 22:27             ` Måns Rullgård
2003-10-22  1:42 Pallipadi, Venkatesh
2003-10-22  1:42 ` Pallipadi, Venkatesh
2003-10-22  1:48 Pallipadi, Venkatesh
2003-10-22  1:48 ` Pallipadi, Venkatesh
2003-10-22 18:21 Pallipadi, Venkatesh
2003-10-23  8:19 ` Arjan van de Ven
2003-10-23  8:24   ` Alexander Bokovoy
2003-10-23  8:29     ` Arjan van de Ven
2003-10-23 18:03       ` Ducrot Bruno
2003-10-23 18:16   ` Todd Poynor
2003-10-23 18:26     ` Todd Poynor
2003-11-02 20:28 ` Jan Rychter
2003-11-04  3:14 Brown, Len
2003-11-04  3:21 ` Jan Rychter
2003-11-04  7:16   ` Dominik Brodowski
2003-11-05 21:12 Mukesh Rajan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.