I wonder why there is no /proc/cpufreq on my Titanium PowerBook G4 (400 MHz).
I use the plain vanilla kernel.org 2.4.20 kernel compiled with the benh10 and
mh6 patches. I also have no cpufreq related error messages in syslog.
In .config it says:
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_24_API is not set
CONFIG_CPU_FREQ_26_API=y
CONFIG_CPU_FREQ_PMAC=y
cat /proc/cpuinfo delivers:
cpu : 7410, altivec supported
temperature : 31-33 C (uncalibrated)
clock : 400MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 797.90
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 384MB
pmac-generation : NewWorld
In linux-2.4.20/arch/ppc/platforms/pmac_cpufreq.c it says:
/* Currently, we support the following machines:
*
* - Titanium PowerBook 800 (PMU based, 667Mhz & 800Mhz)
* - Titanium PowerBook 500 (PMU based, 300Mhz & 500Mhz)
* - iBook2 500 (PMU based, 400Mhz & 500Mhz)
* - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage)
*/
and:
/* Else check for TiPb 500 */
else if (machine_is_compatible("PowerBook3,2")) {
/* We only know about 500Mhz model */
if (cur_freq < 450000 || cur_freq > 550000)
goto out;
hi_freq = cur_freq;
low_freq = 300000;
has_freq_ctl = 1;
cpufreq_uses_pmu = 1;
}
Is my machine missing some crucial hardware? I have a TiPb 400, don't I?
I currently have some 180 Minutes of run on battery, I do not need full
processing power but rather longer battery life.
Salut
Mark
--
To UNSUBSCRIBE, email to debian-powe...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
I was trying the package apt-build (a really neat tool to rebuild all or some of
the installed packages on one's workstation, including all dependencies) and
noticed that CPU-specific optimization options are missing on PPC and HPPA.
The corresponding options offered on i386 are:
pentium
pentium-mmx
pentiumpro
pentium2
pentium3
pentium4
Those values affect the 'march' and 'mcpu' options that are passed to GCC.
As I do not know everything there is to know about either architecture, I'd
welcome knowledgeable people on both lists to send the package author's (CC
Julien Danjou) what similar CPU options should be offered on PPC and HPPA.
Apt-build has already brought benefits similar to Pentium-builder on my Intel
boxes, except that apt-build is designed as a generic framework that can
accomodate other architectures, which is much smarter than Pentium-builder.
I like it.
Thanks in advance to anyone who can help improve the usefullness of this package
on PPC and HPPA too.
--
Martin-Éric Racine
http://www.pp.fishpool.fi/~q-funk/
Yes, but I do not know PPC and HPPA ! ;-)
> As I do not know everything there is to know about either architecture, I'd
> welcome knowledgeable people on both lists to send the package author's (CC
> Julien Danjou) what similar CPU options should be offered on PPC and HPPA.
This would be great.
> Apt-build has already brought benefits similar to Pentium-builder on my Intel
> boxes, except that apt-build is designed as a generic framework that can
> accomodate other architectures, which is much smarter than Pentium-builder.
Right.
I am listening to any idea.
[...]
Cheers,
--
Julien Danjou
.''`. Debian developer
: :' : http://jdanjou.org
`. `' http://people.debian.org/~acid
`- GPG: 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD
Because no-one filled in the right values yet.
> In linux-2.4.20/arch/ppc/platforms/pmac_cpufreq.c it says:
> /* Currently, we support the following machines:
> *
> * - Titanium PowerBook 800 (PMU based, 667Mhz & 800Mhz)
> * - Titanium PowerBook 500 (PMU based, 300Mhz & 500Mhz)
> * - iBook2 500 (PMU based, 400Mhz & 500Mhz)
> * - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage)
> */
From Apple's spec sheets:
PowerBook4,1: high speed is 500 or 600, low speed is 400.
PowerBook4,2: no spec available.
PowerBook4,3: high speed is 600 or 700, low speed not mentioned.
These are the iBooks, I don't have the sheets for the TiBooks
readily available; maybe look in there?
I seem to remember the PowerBook3,2 @ 400 has a low speed of
300MHz, but I'm not fully sure about that -- better check it
yourself (apple.com -> developer -> hardware -> all products
or something like that, it's not too hard to find).
Or ask the System Profiler (in MacOS), under heading "hardware overview".
> and:
> /* Else check for TiPb 500 */
> else if (machine_is_compatible("PowerBook3,2")) {
> /* We only know about 500Mhz model */
> if (cur_freq < 450000 || cur_freq > 550000)
> goto out;
Try to remove these last three lines (your own risk, of course).
> hi_freq = cur_freq;
> low_freq = 300000;
> has_freq_ctl = 1;
> cpufreq_uses_pmu = 1;
> }
>
>
> Is my machine missing some crucial hardware? I have a TiPb 400, don't I?
It doesn't miss anything. You do have a PowerBook G4 "Mercury" @ 400MHz.
Have fun,
Segher
> > /* Else check for TiPb 500 */
> > else if (machine_is_compatible("PowerBook3,2")) {
> > /* We only know about 500Mhz model */
> > if (cur_freq < 450000 || cur_freq > 550000)
> > goto out;
> Try to remove these last three lines (your own risk, of course).
I commented out the 3 lines, recompiled Ben's 2.4.20-ben10 and voilà:
tomcat:~# cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 300000 kHz ( 75 %) - 400000 kHz (100 %) - performance
tomcat:~# cat /proc/cpuinfo
cpu : 7410, altivec supported
temperature : 19-21 C (uncalibrated)
clock : 400MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 797.90
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 384MB
pmac-generation : NewWorld
tomcat:~# echo 300000:400000:powersave > /proc/cpufreq
tomcat:~# cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 300000 kHz ( 75 %) - 400000 kHz (100 %) - powersave
tomcat:~# echo 0:0:powersave > /proc/cpufreq
tomcat:~# cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 300000 kHz ( 75 %) - 300000 kHz ( 75 %) - powersave
The time reported by xpmumon and klaptopd have increased by some estimated
10%. (from 180 Min to 200 Min.)
As far as I can tell, it runs as fine. I will report any trouble.
Salut
Mark
--
Krisztian Mark Szentes
produktivIT - Open-Source Solution Provider
Siebenbrunnengasse 55/7
A-1050 Wien
Can you change #undef DEBUG_FREQ to #define DEBUG_FREQ in pmac_cpufreq.c ?
That will force the driver to recalc the bogomips on speed change. Once
done, check that the recalculated bogomips changes to about 600 at
low speed and back to about 800 when running at full speed.
Ben.
Benjamin Herrenschmidt wrote:
>
> > The time reported by xpmumon and klaptopd have increased by some estimated
> > 10%. (from 180 Min to 200 Min.)
> >
> > As far as I can tell, it runs as fine. I will report any trouble.
>
> Can you change #undef DEBUG_FREQ to #define DEBUG_FREQ in pmac_cpufreq.c ?
>
> That will force the driver to recalc the bogomips on speed change. Once
> done, check that the recalculated bogomips changes to about 600 at
> low speed and back to about 800 when running at full speed.
I got a question here. I have a 700MHz iBook 2.2 and I wonder whether
it scales the cpu frequency dynamically based on load and policy.
Ie:
17:19 root@bart:/home/viktor # echo 0:0:700000:performance > /proc/cpufreq
17:20 root@bart:/home/viktor # cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 400000 kHz ( 57 %) - 700000 kHz (100 %) - performance
17:20 root@bart:/home/viktor # cat /proc/cpuinfo
cpu : 750FX
temperature : 36 C (uncalibrated)
clock : 700MHz
revision : 1.2 (pvr 7000 0102)
bogomips : 1389.36
machine : PowerBook4,3
motherboard : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
board revision : 00000001
detected as : 257 (iBook 2 rev. 2)
pmac flags : 0000000b
L2 cache : 512K unified
memory : 256MB
pmac-generation : NewWorld
17:20 root@bart:/home/viktor # echo 0:0:700000:powersave > /proc/cpufreq
17:21 root@bart:/home/viktor # cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 400000 kHz ( 57 %) - 700000 kHz (100 %) - powersave
17:21 root@bart:/home/viktor # cat /proc/cpuinfo
cpu : 750FX
temperature : 38 C (uncalibrated)
clock : 400MHz
revision : 1.2 (pvr 7000 0102)
bogomips : 793.92
machine : PowerBook4,3
motherboard : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
board revision : 00000001
detected as : 257 (iBook 2 rev. 2)
pmac flags : 0000000b
L2 cache : 512K unified
memory : 256MB
pmac-generation : NewWorld
Note the difference in the clock speed and bogomips counter. So static
scaling seems to work.
However, when I generate load in the powersave mode, the clock speed and
bogomips count stay the same. The only difference I see is in the cpu
temperature, which starts to climb very fast. Is this an indication of
higher cpu speed? Or is it still clocked at 400MHz?
Ciao,
Viktor
>
> Ben.
>
>
> --
> To UNSUBSCRIBE, email to debian-powe...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
>
--
Viktor Rosenfeld
WWW: http://www.informatik.hu-berlin.de/~rosenfel/
I gotta investigate further into it (if it stops the compilation without
DEBUG), it seems unrelated as it stops within net/ipv4/fib_semantics.c
Salut
Mark
--
Krisztian Mark Szentes
produktivIT - Open-Source Solution Provider
Siebenbrunnengasse 55/7
A-1050 Wien
So set DEBUG_FREQ and tell me what dmesg says upon switches
tomcat:~# cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 400000 kHz (100 %) - 400000 kHz (100 %) - performance
tomcat:~# cat /proc/cpuinfo
cpu : 7410, altivec supported
temperature : 19-21 C (uncalibrated)
clock : 400MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 797.90
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 384MB
pmac-generation : NewWorld
tomcat:~# echo -n "0%0%0%powersave" > /proc/cpufreq
tomcat:~# cat /proc/cpufreq
minimum CPU frequency - maximum CPU frequency - policy
CPU 0 300000 kHz ( 75 %) - 300000 kHz ( 75 %) - powersave
tomcat:~# cat /proc/cpuinfo
cpu : 7410, altivec supported
temperature : 21-25 C (uncalibrated)
clock : 300MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 598.42
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 384MB
pmac-generation : NewWorld
The bogomips number seems to get recalculated even without the DEBUG_FREQ
set.
Salut
Mark
P.S. in Documentation/cpufreq the ppc platform does not evet get mentioned.
--
Krisztian Mark Szentes
produktivIT - Open-Source Solution Provider
Siebenbrunnengasse 55/7
A-1050 Wien
You're supposed to adjust the new frequency to what you're actually
going to do, not what the user requested. This should ensure that
the recalculated bogomips is correct.
--
Russell King (r...@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
Of course ;) The problem here is about that specific machine model
for which I'm not sure what frequency I will get after asking a
speed change to the Power Management Unit
(it seem it will be 300Mhz, but I want him to try the debug stuff I
added that will redo the bogomips measurement so I can verify it's
actually 300Mhz).
Salut
Mark
Now, that's strange. I remember we measured 300Mhz for the low speed
of the 500Mhz model...
Ben.
Am Sonntag, 15. Juni 2003 15:52 schrieb Benjamin Herrenschmidt:
> On Thu, 2003-06-12 at 16:00, Krisztian Mark Szentes wrote:
> > On Friday 23 May 2003 00:48, Segher Boessenkool wrote:
> > > Krisztian Mark Szentes wrote:
> > > > I wonder why there is no /proc/cpufreq on my Titanium PowerBook G4
> > > > (400 MHz).
> > > Because no-one filled in the right values yet.
> > ...
> > > I seem to remember the PowerBook3,2 @ 400 has a low speed of
> > > 300MHz, but I'm not fully sure about that -- better check it
> > > yourself (apple.com -> developer -> hardware -> all products
> > > or something like that, it's not too hard to find).
> >
http://developer.apple.com/techpubs/hardware/Developer_Notes/Macintosh_CPUs-G4/PowerBook_G419Dec00/index.html
> > says:
> > "On the PowerBook G4 computer, the slower clock speed is 100 MHz slower
> > than the rated speed: 300 MHz on a 400-MHz model, 400 MHz on a 500 MHz
> > model."
>
> Now, that's strange. I remember we measured 300Mhz for the low speed
> of the 500Mhz model...
Am Freitag, 23. Mai 2003 11:19 schrieben Sie:
> I'm not sure that will work. On the other hand, I'm pretty sure the freq.
> switching is _NOT_ supported on this model...
finally I edited the sources (a version of 2.4.20 lying around here):
..
#define DEBUG_FREQ
..
/* Else check for TiPb 500 */
else if (machine_is_compatible("PowerBook3,2")) {
/* Mark:and 400 MHz */
if (cur_freq < 350000 || cur_freq > 550000)
goto out;
hi_freq = cur_freq;
low_freq = 300000;
has_freq_ctl = 1;
cpufreq_uses_pmu = 1;
recompiled and fired it up:
# cat /proc/cpuinfo
cpu : 7410, altivec supported
temperature : 17-21 C (uncalibrated)
clock : 400MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 797.90
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 512MB
pmac-generation : NewWorld
# cat /proc/sys/cpu/0/speed-min > /proc/sys/cpu/0/speed
# cat /proc/cpuinfo
cpu : 7410, altivec supported
temperature : 17-21 C (uncalibrated)
clock : 300MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 598.42
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 512MB
pmac-generation : NewWorld
# dmesg | tail -3
HID1, before: a0000000
HID1, after: 80000000
Calibrating delay loop... 598.01 BogoMIPS
# cat /proc/sys/cpu/0/speed-max > /proc/sys/cpu/0/speed
# cat /proc/cpuinfo
cpu : 7410, altivec supported
temperature : 18-22 C (uncalibrated)
clock : 400MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 797.90
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 512MB
pmac-generation : NewWorld
# dmesg | tail -3
HID1, before: 80000000
HID1, after: a0000000
Calibrating delay loop... 797.90 BogoMIPS
BTW, the power consumption as displayed by xpmumon changes only by approx.
0,5 Watt. I also do not understand why the bogomips numbers are not
exactly the same (598.01 versus 598.42).
Has it convinced you to include the Titanium 400 MHz into the future
cpufreq supported models?
Thank you for your work!
Salut
Mark
Your numbers look good. Send me a patch :)
Ben.