Early thermal control...

Programming, for all ages and all languages.
Post Reply
A5
Posts: 17
Joined: Wed Sep 29, 2010 8:41 am

Early thermal control...

Post by A5 »

Hi! I wonder how early I must configure thermal control and the ISRs for the NMIs. My second stage loader will configure all the system. But there I have much things to do before configure NMIs. Now the bootloader and the second stage code execute in half second in virtual machine. I don't know if in 1 second or two, the CPU can get warm enough to generate some interrupt.
Do I have to configure in the begining some critical thermal and hardware error ISRs? Who of them are the most important and should be configured in the begining of all?

(I practically have coded an CLI in the begining and after two months of coding, I still have not coded STI)
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Early thermal control...

Post by gerryg400 »

A5 wrote:Hi! I wonder how early I must configure thermal control and the ISRs for the NMIs. My second stage loader will configure all the system. But there I have much things to do before configure NMIs. Now the bootloader and the second stage code execute in half second in virtual machine. I don't know if in 1 second or two, the CPU can get warm enough to generate some interrupt.
Do I have to configure in the begining some critical thermal and hardware error ISRs? Who of them are the most important and should be configured in the begining of all?

(I practically have coded an CLI in the begining and after two months of coding, I still have not coded STI)
You can ignore thermal control and NMI for now. I would do other things first and return to these problems later. BTW, the cli instruction does not prevent NMI.
If a trainstation is where trains stop, what is a workstation ?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Early thermal control...

Post by Solar »

Well, actually that is an issue with laptops...

I have that situation with mine. I have a dual-boot WinXP / Linux setup. Not a cheapo laptop either (Acer TravelMate). When playing a game under Windows (the system running in "performance" mode, i.e. no CPU throttling applied), the system gets pretty hot. When I reboot to get into Linux, this is what happens:
  • the CPU fan spins down (system still seriously hot)
  • the laptop re-inits and loads the GRUB menu (fan spinning up again under BIOS control, but no CPU throttle applied)
  • I select Linux from the GRUB menu
  • fan spins down again
  • Linux initializes (I assume without CPU throttles applied), which takes a couple of seconds
  • /me worrying for my CPU
At that point, two things can happen:
  • the system finishes its init, and the fan comes back up
  • the system tells me "CPU temperature limit reached" and powers down again (which again takes a couple of seconds without the fan doing max RPM - I am really worried then)
So yes, thermal control and fan control is an issue you should think about early on (in the boot sequence, not necessarily the development process). Personally, I would apply max. CPU throttle / max. fan speed ASAP after boot, and keep it that way until I have "real" thermal control set up. Having a boot sequence two seconds longer and a "fan blast" at bootup beats cooking your CPU.
Every good solution is obvious once you've found it.
A5
Posts: 17
Joined: Wed Sep 29, 2010 8:41 am

Re: Early thermal control...

Post by A5 »

Now I am worried too.
In the future I will buy only laptops. My current laptop have the fan working in breaks. When I start the system, fan don't start immediatelly. After a while it starts working. Then after another while, fan stops and after another pause, it starts again. I have centrino2 with one of the P-series processors that need less power and heats less too.
I am curious if an CPU working all his life at 30ºC, will live longer than another CPU that run all his life at 60ºC. I am considering the option to have the laptop-fan working non-stop, no matter the current CPU-temperature. But this probably will rapidly gather dust in the fan...
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Early thermal control...

Post by Solar »

The start-stop-start thing you describe is rather typical for laptops. You don't want the noise and the energy consumption of the fan if possible, so the thermal control powers down the fan when the CPU doesn't run hot.

The life expectancy of a CPU (in a decent system that doesn't shirk on cooling and doesn't get overclocked to death) is usually much higher than its expected usefulness: Long before the CPU actually dies, it has become so outdated you are buying a new system anyway.

60 degrees is nothing for a CPU today. You can look up the technical datasheets for the various processors; most are spec'ed to run at much higher temperatures. (I know that my laptop CPU doesn't bother about the 100 degrees it reaches when under continuous load. The CPU is spec'ed for 110 degrees plus, and throttling reliably keeps in below that - unless I am rebooting, see above).

As for dust in the fan, if you're worried, introduce your laptop to a vacuum cleaner at regular intervals. CPU fans usually sit directly beneath a grill in the casing, so it's easy to vacuum the worst dustballs out of them - and again, they're spec'ed for a certain amount of accumulated dust.

Since 1999, I've had three laptops which saw daily, heavy use. I never vacuumed any of them, and never had a problem either.
Every good solution is obvious once you've found it.
A5
Posts: 17
Joined: Wed Sep 29, 2010 8:41 am

Re: Early thermal control...

Post by A5 »

Solar wrote:60 degrees is nothing for a CPU today.
This reassures me. I was worried a lot of my hot laptop case.

Thanks!
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Early thermal control...

Post by Owen »

Solar wrote:As for dust in the fan, if you're worried, introduce your laptop to a vacuum cleaner at regular intervals. CPU fans usually sit directly beneath a grill in the casing, so it's easy to vacuum the worst dustballs out of them - and again, they're spec'ed for a certain amount of accumulated dust.
Heh. My laptop's CPU is around the U key on the keyboard. The only fan grill is in the screen hinge...

(To be fair, one can access the system cooler by unscrewing the bottom plate by which one also accesses the SODIMM slots and hard drive bay.)

However, for reference: My old system's GPU has spent several years running at a constant 75C without issue ever developing (Cleaning nVIDIA coolers is very difficult). AMD CPUs since the late Athlon classics have had a thermal cutout when they get too hot. Intel have had the same since the Pentium 3; the Pentium IV introduced automatic frequency downscaling when the CPU gets too hot (you can literally pull the heatsink off a P4 and it will not crash - it will just run really, really slowly). All of these mechanisms are fully autonomous and implemented in hardware; the CPU will protect itself if the OS fails to do its job.
Post Reply