dual core laptop running unbearably hot

Matthew Dillon dillon at apollo.backplane.com
Mon Dec 25 20:16:58 PST 2006


:ah, i forgot to say "per second".  if i am seeing this correctly, the clock interrupt runs with 280 Hz, per cpu probably.  1000 Hz is still much more, even when accounting for two CPUs.  but that's not my concern.  my point is that there are 11226 idle spins per second (and about equally many mplock contentions).  I think that's what is heating my laptop:  busy looping on mplock/tokens.
:...
:>     It is always possible that I made a mistake in the coding, too, but
:>     if cpu_idle_hltcnt is being incremented it is almost certain that 
:>     cpu_idle_hook() is being called which means HLT is being called.
:
:yes, but as you can read from my numbers there are about 1000 HLTs per second and 10000 mplock contentions and spins.
:
:cheers
:  simon

    Here's what I get on my AMD X2 test box:

test28# while ( 1 )
while? sysctl -a | egrep 'cpu_idle|mplock_cont'
while? sleep 10
while? end
machdep.cpu_idle_hlt: 1
machdep.cpu_idle_hltcnt: 14598326
machdep.cpu_idle_spincnt: 72385953
lwkt.mplock_contention_count: 120400732
machdep.cpu_idle_hlt: 1
machdep.cpu_idle_hltcnt: 14605127
machdep.cpu_idle_spincnt: 72443243
lwkt.mplock_contention_count: 120458701
machdep.cpu_idle_hlt: 1
machdep.cpu_idle_hltcnt: 14611631
machdep.cpu_idle_spincnt: 72487587
lwkt.mplock_contention_count: 120502382
machdep.cpu_idle_hlt: 1
machdep.cpu_idle_hltcnt: 14618392
machdep.cpu_idle_spincnt: 72533197
lwkt.mplock_contention_count: 120548685

    I am getting around 46000 contention, 45000 spin, and 6761 HLTs per
    10 seconds.

    First of all, keep in mind that these cpus can execute 2 billion
    instructions a second.

    The mplock contention and idle spin counts are hard loops... there is
    nothing (i.e. no HLT) slowing the cpu down.  That means these numbers
    would have to be in the millions to make a significant dent on available
    processing power.  Each HLT loop is stalling the cpu for a far, far longer
    period of time.... HLT doesn't return until an interrupt occurs.

    I am fairly certain that these are reasonable numbers.  I can usually
    hear the fan ratchet up on my test box when I'm loading the cpus down
    and its running at its lowest speed when the test box is idle.

						-Matt






More information about the Kernel mailing list