* PowerPC cpufreq using ICTC
@ 2006-06-27 14:56 Matt Sealey
2006-06-27 22:14 ` Guennadi Liakhovetski
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Matt Sealey @ 2006-06-27 14:56 UTC (permalink / raw)
To: linux-pm
Hello,
After a little discussion on linux-ppc kernel mailing list I got pointed here.
I am investigating more generic power management (cpufreq) for PowerPC, both
in terms of DFS and the G3 dual-PLL feature (which is already implemented in
the PowerMac driver) and also using the G3/G4 "ICTC" register which stalls
the instruction fetch for 1-255 clocks in order to allow the execution units to
go into dynamic power management (when DPM is enabled). This should, by all
documentation, reduce the power consumption of the CPU.
I'm looking at it from the point of view of the Pegasos (www.pegasosppc.com)
because right now we only have G3 (750CXe) and G4 (7447) processor cards
which do not support DFS. The G3 is fanless so there is no scope to reduce
noise dynamically or turn the fan off, and the G4 fan has no controller so
the same applies. We also do not support batteries, so you're always on an
AC power supply, but it WOULD be an interesting project to see if it could
improve the lifetime of a system running off one of these:
http://www.freeplayenergy.com/index.php?section=products&subsection=freechargeportable
It is merely an exercise in whether it can be done effectively (notwithstanding
the possibility of turning a 1GHz G4 into a 4MHz G4 :) and an interesting test
of whether the feature works "as advertised" by the IBM and Freescale manuals.
It may also be a cute way of testing application performance on slower
processors, while using the best you have. I dunno. There are lots of things
floating around in my head right now :)
So the question is, is there already a generic powerpc cpufreq driver which
does not rely on PowerMac hardware/platform tree or a PMU, if not where
should I be looking to start, and is this a good idea anyway? I have seen
threads (from 1-4 years ago) where it was discussed and passed off or, but
it was all fairly conversational.
http://lists.debian.org/debian-powerpc/2002/08/msg00107.html
http://www.mail-archive.com/debian-powerpc@lists.debian.org/msg03607.html
http://www.toojays.net/portal/Wiki/IBookG4PowerConsumption
--
Matt Sealey <matt@genesi-usa.com>
Manager, Genesi, Developer Relations
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PowerPC cpufreq using ICTC
2006-06-27 14:56 PowerPC cpufreq using ICTC Matt Sealey
@ 2006-06-27 22:14 ` Guennadi Liakhovetski
2006-06-27 23:23 ` Benjamin Herrenschmidt
2006-06-29 5:50 ` Paul Mackerras
2 siblings, 0 replies; 6+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-27 22:14 UTC (permalink / raw)
To: Matt Sealey; +Cc: linux-pm
On Tue, 27 Jun 2006, Matt Sealey wrote:
> I am investigating more generic power management (cpufreq) for PowerPC, both
> in terms of DFS and the G3 dual-PLL feature (which is already implemented in
> the PowerMac driver) and also using the G3/G4 "ICTC" register which stalls
> the instruction fetch for 1-255 clocks in order to allow the execution units to
> go into dynamic power management (when DPM is enabled). This should, by all
> documentation, reduce the power consumption of the CPU.
Hm, I thought about replying to this thread writing something like "I'd
like to co-operate by implementing CPU_FREQ on G2 / MPC824x", but then,
looking at datasheets, it looks like it doesn't support any frequency
scaling:-( So, out of luck here... Or have I overseen anything?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PowerPC cpufreq using ICTC
2006-06-27 14:56 PowerPC cpufreq using ICTC Matt Sealey
2006-06-27 22:14 ` Guennadi Liakhovetski
@ 2006-06-27 23:23 ` Benjamin Herrenschmidt
2006-06-28 8:04 ` Matt Sealey
2006-06-29 5:50 ` Paul Mackerras
2 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2006-06-27 23:23 UTC (permalink / raw)
To: matt; +Cc: linux-pm
On Tue, 2006-06-27 at 09:56 -0500, Matt Sealey wrote:
> I'm looking at it from the point of view of the Pegasos (www.pegasosppc.com)
> because right now we only have G3 (750CXe) and G4 (7447) processor cards
> which do not support DFS.
7447A is supposed to support it no ?
> The G3 is fanless so there is no scope to reduce
> noise dynamically or turn the fan off,
Also G3 generally support at least DOZE mode when idle, unlike the 7447
where all you have is NAP which is better, but requires proper
northbridge support... I would be surprised if the Discovery II used on
the Pegasos supports that properly and without funky bugs...
> and the G4 fan has no controller so
> the same applies. We also do not support batteries, so you're always on an
> AC power supply, but it WOULD be an interesting project to see if it could
> improve the lifetime of a system running off one of these:
>
> http://www.freeplayenergy.com/index.php?section=products&subsection=freechargeportable
>
> It is merely an exercise in whether it can be done effectively (notwithstanding
> the possibility of turning a 1GHz G4 into a 4MHz G4 :) and an interesting test
> of whether the feature works "as advertised" by the IBM and Freescale manuals.
> It may also be a cute way of testing application performance on slower
> processors, while using the best you have. I dunno. There are lots of things
> floating around in my head right now :)
>
> So the question is, is there already a generic powerpc cpufreq driver which
> does not rely on PowerMac hardware/platform tree or a PMU, if not where
> should I be looking to start, and is this a good idea anyway? I have seen
> threads (from 1-4 years ago) where it was discussed and passed off or, but
> it was all fairly conversational.
>
> http://lists.debian.org/debian-powerpc/2002/08/msg00107.html
> http://www.mail-archive.com/debian-powerpc@lists.debian.org/msg03607.html
>
> http://www.toojays.net/portal/Wiki/IBookG4PowerConsumption
I'm not sure a cpufreq driver is the best thing to do but let's first
simply measure if ICTC helps at all... it should be fairly trivial to do
a simple kernel module to tweak the value.
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PowerPC cpufreq using ICTC
2006-06-27 23:23 ` Benjamin Herrenschmidt
@ 2006-06-28 8:04 ` Matt Sealey
0 siblings, 0 replies; 6+ messages in thread
From: Matt Sealey @ 2006-06-28 8:04 UTC (permalink / raw)
To: 'Benjamin Herrenschmidt'; +Cc: linux-pm
> -----Original Message-----
> From: Benjamin Herrenschmidt [mailto:benh@kernel.crashing.org]
> Sent: Tuesday, June 27, 2006 6:23 PM
> To: matt@genesi-usa.com
> Cc: linux-pm@lists.osdl.org
> Subject: Re: [linux-pm] PowerPC cpufreq using ICTC
>
> On Tue, 2006-06-27 at 09:56 -0500, Matt Sealey wrote:
>
> > I'm looking at it from the point of view of the Pegasos
> > (www.pegasosppc.com) because right now we only have G3
> (750CXe) and G4
> > (7447) processor cards which do not support DFS.
>
> 7447A is supposed to support it no ?
Yeah but we don't ship that processor card (nor a 7448 even
though we have the design and prototypes) and right now.. I
doubt we ever will considering the cost and rather unnoticable
performance improvement in the heavy stuff. Unfortunately there
aren't many customers out there who want do to the kind of
benchmarks you see on the EEMBC scores, the ones that make the
G4 shine, they just want to run MySQL or GNOME..
> > The G3 is fanless so there is no scope to reduce noise
> > dynamically or turn the fan off,
>
> Also G3 generally support at least DOZE mode when idle,
> unlike the 7447 where all you have is NAP which is better,
> but requires proper northbridge support... I would be
> surprised if the Discovery II used on the Pegasos supports
> that properly and without funky bugs...
I can find out pretty quickly.. when Gerald gets back in the
office.. *stares at the door*.
> I'm not sure a cpufreq driver is the best thing to do but
> let's first simply measure if ICTC helps at all... it should
> be fairly trivial to do a simple kernel module to tweak the value.
One of those links had one (maybe a year old) with a sysfs entry
to mess with. Unfortunately! I don't have the resources to really
test it here without dragging a couple guys away from real important
work. It *DOES* work but I'll be damned if I can see any difference
apart from the speed on the G4, and I don't have a G3 handy to check
the temperature.
--
Matt Sealey <matt@genesi-usa.com>
Manager, Genesi, Developer Relations
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PowerPC cpufreq using ICTC
2006-06-27 14:56 PowerPC cpufreq using ICTC Matt Sealey
2006-06-27 22:14 ` Guennadi Liakhovetski
2006-06-27 23:23 ` Benjamin Herrenschmidt
@ 2006-06-29 5:50 ` Paul Mackerras
2006-06-29 12:30 ` Matt Sealey
2 siblings, 1 reply; 6+ messages in thread
From: Paul Mackerras @ 2006-06-29 5:50 UTC (permalink / raw)
To: matt; +Cc: linux-pm
Matt Sealey writes:
> I am investigating more generic power management (cpufreq) for PowerPC, both
> in terms of DFS and the G3 dual-PLL feature (which is already implemented in
> the PowerMac driver) and also using the G3/G4 "ICTC" register which stalls
> the instruction fetch for 1-255 clocks in order to allow the execution units to
> go into dynamic power management (when DPM is enabled). This should, by all
> documentation, reduce the power consumption of the CPU.
But does it reduce the energy consumed per instruction executed, or
increase it? I would expect that you wouldn't see any improvement in
energy per instruction unless you can reduce the CPU core Vdd voltage.
If you can't reduce the energy per instruction then you might as well
"race to idle", which is effectively what we do currently.
Paul.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PowerPC cpufreq using ICTC
2006-06-29 5:50 ` Paul Mackerras
@ 2006-06-29 12:30 ` Matt Sealey
0 siblings, 0 replies; 6+ messages in thread
From: Matt Sealey @ 2006-06-29 12:30 UTC (permalink / raw)
To: 'Paul Mackerras'; +Cc: linux-pm
> > (when DPM is enabled). This should, by all documentation,
> reduce the power consumption of the CPU.
>
> But does it reduce the energy consumed per instruction
> executed, or increase it?
In theory if you do not issue instructions to the units, DPM turns
themselves off saving (from some Freescale doc on the subject) around
6% power (while running benchmark code). Every pipeline bubble
adds to the power saving! :]
Then the theory goes that if you can force the units to sit idle for
1-255 instructions you can save more.
I have no idea if it actually works.. that is what I wanted to find
out.
> see any improvement in energy per instruction unless you can
> reduce the CPU core Vdd voltage.
It doesn't improve energy per instruction, so much as allow the units
to go into low-power states so while there are no instructions being
fetched, you aren't wasting power.
> If you can't reduce the energy per instruction then you might
> as well "race to idle", which is effectively what we do currently.
Like I said that is what I wanted to find out. Let me find that
Freescale doc..
http://www.freescale.com/files/32bit/doc/app_note/AN2436.pdf
--
Matt Sealey <matt@genesi-usa.com>
Manager, Genesi, Developer Relations
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-29 12:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-27 14:56 PowerPC cpufreq using ICTC Matt Sealey
2006-06-27 22:14 ` Guennadi Liakhovetski
2006-06-27 23:23 ` Benjamin Herrenschmidt
2006-06-28 8:04 ` Matt Sealey
2006-06-29 5:50 ` Paul Mackerras
2006-06-29 12:30 ` Matt Sealey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox