[K42-discussion] G5 thermal management patches for kitchsrc and linux-029
Patrick Bozeman
PEBozeman at lbl.gov
Wed Mar 1 09:48:22 EST 2006
I've done some more testing. I've attached a graph of the thermal
characteristics of the system running under both linux and K42. In my
test, I let the system run idle for 15 minutes, then I ran 4 instances
of fbench for approximately 15 minutes, and then let the system run idle
for another 15 minutes.
I've done some more testing. I've attached a graph of the thermal
characteristics of the system running under both linux and K42. In my
test, I let the system run idle for 15 minutes, then I ran 4 instances
of fbench for approximately 15 minutes, and then let the system run idle
for another 15 minutes.
There are a few interesting things to note in the graphs. Under load
both K42 and Linux thermal characteristics are similar. However, when
idle, Linux uses significantly less power, produces less heat, and the
fans are "idle" at 300rpm. K42 on the other hand, is basically always
running the cpu under full load. This appears to be because the K42
idle loop just performs a very tight infinite loop, whereas the Linux
idle loop places the processor in NAP mode.
I tried to modify the IdleLoopHardware loop in
exception/arch/ExceptionLocalAsm.s in K42 to put the processor in NAP
mode, but it didn't seem to work. I seem to be following the same
sequence as both darwin and Linux, but I'm really not very familiar with
the powerpc, and especially not with the tricky little dance that seems
to be required to get it to go into NAP mode. If anyone on the list has
knowledge in this area, I would appreciate syncing up with them over email.
Missing interrupts when under gdb doesn't appear to be a problem.
According to the Apple docs at:
http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G5/PowerMacG5/2Architecture/chapter_3_section_9.html
, "If the FCU does not receive an update from the operating system
within two minutes, it begins to ramp up the speed of the fans to full
speed."
I also stopped the kernel in gdb to verify this. The fans spun up to
full speed after 2 minutes of the kernel gdb break.
However, I'm still concerned by Michal's experience. For the time
being, I'm going to hold on to the thermal management patch and just use
it locally (as will Paul probably) since I think we are among the few
people running K42 on G5s in our offices where the fan noise really matters.
Anyone else that wants to consider running with the thermal management
patch, can make a personal decision based on the above information.
Thanks
p.s. As noted above, it would be nice to get the processor into NAP
mode when idle, so if anyone has any experience in this area, let me know.
Michal Ostrowski wrote:
>>>Unless Michal has objections, I will go through this patch tomorrow and
>>>commit it if I don't see anything wrong. Have you stress tested it
>>>(hopefully sitting in front of the machine with the ability to yank the
>>>power)? I'd hate to melt your or somebody else's procesor ...
>>>
>>>
>>>
>>>
>>I've tested it some and initial tests seemed ok but you should probably
>>do more before a commit is made since I haven't put it under as much
>>stress as it deserves. I am probably too trusting of the fact that that
>>the therm code is a direct copy of the linux code. And since it isn't
>>really running under a full linux kernel, this trust may be unfounded.
>>
>>
>>
>>>
>>>
>>>
>
>I'm fairly certain that I've fried 2 CPUs in the past (go try explaining
>that to Apple service techs). Things get fun when the K42 debugger
>kicks in: it results in interrupts not being processed for a long time,
>not to mention some serious potential "time warp" effects observed by
>Linux code.
>
>If you're not running the debugger then the fan control code behaves
>really closely to what happens in Linux.
>
>When you turn the debugger on:
>
>- at least one CPU ends up spinning tightly in a loop reading of the
>serial port (higher temp?)
>
>- fan control code may not get kicked (if you're debugging on the CPU
>that is to get that interrupt).
>
>- you better hope that the fan control HW will take over and rev up the
>fans.
>
>
>Michal
>
>
>
There are a few interesting things to note in the graphs. Under load
both K42 and Linux thermal characteristics are similar. However, when
idle, Linux uses significantly less power, produces less heat, and the
fans are "idle" at 300rpm. K42 on the other hand, is basically always
running the cpu under full load. This appears to be because the K42
idle loop just performs a very tight infinite loop, whereas the Linux
idle loop places the processor in NAP mode.
I tried to modify the IdleLoopHardware loop in
exception/arch/ExceptionLocalAsm.s in K42 to put the processor in NAP
mode, but it didn't seem to work. I seem to be following the same
sequence as both darwin and Linux, but I'm really not very familiar with
the powerpc, and especially not with the tricky little dance that seems
to be required to get it to go into NAP mode. If anyone on the list has
knowledge in this area, I would appreciate syncing up with them over email.
Missing interrupts when under gdb doesn't appear to be a problem.
According to the Apple docs at:
http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G5/PowerMacG5/2Architecture/chapter_3_section_9.html
, "If the FCU does not receive an update from the operating system
within two minutes, it begins to ramp up the speed of the fans to full
speed."
I also stopped the kernel in gdb to verify this. The fans spun up to
full speed after 2 minutes of the kernel gdb break.
However, I'm still concerned by Michal's experience. For the time
being, I'm going to hold on to the thermal management patch and just use
it locally (as will Paul probably) since I think we are among the few
people running K42 on G5s in our offices where the fan noise really matters.
Anyone else that wants to consider running with the thermal management
patch, can make a personal decision based on the above information.
Thanks
p.s. As noted above, it would be nice to get the processor into NAP
mode when idle, so if anyone has any experience in this area, let me know.
Michal Ostrowski wrote:
>>>Unless Michal has objections, I will go through this patch tomorrow and
>>>commit it if I don't see anything wrong. Have you stress tested it
>>>(hopefully sitting in front of the machine with the ability to yank the
>>>power)? I'd hate to melt your or somebody else's procesor ...
>>>
>>>
>>>
>>>
>>I've tested it some and initial tests seemed ok but you should probably
>>do more before a commit is made since I haven't put it under as much
>>stress as it deserves. I am probably too trusting of the fact that that
>>the therm code is a direct copy of the linux code. And since it isn't
>>really running under a full linux kernel, this trust may be unfounded.
>>
>>
>>
>>>
>>>
>>>
>
>I'm fairly certain that I've fried 2 CPUs in the past (go try explaining
>that to Apple service techs). Things get fun when the K42 debugger
>kicks in: it results in interrupts not being processed for a long time,
>not to mention some serious potential "time warp" effects observed by
>Linux code.
>
>If you're not running the debugger then the fan control code behaves
>really closely to what happens in Linux.
>
>When you turn the debugger on:
>
>- at least one CPU ends up spinning tightly in a loop reading of the
>serial port (higher temp?)
>
>- fan control code may not get kicked (if you're debugging on the CPU
>that is to get that interrupt).
>
>- you better hope that the fan control HW will take over and rev up the
>fans.
>
>
>Michal
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: k42therm.png
Type: image/png
Size: 7698 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/k42-discussion/attachments/20060228/2cb361d0/attachment.png
More information about the K42-discussion
mailing list