Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2000 21:09:04 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.ORG>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        freebsd-smp@FreeBSD.ORG, drony@spray.se
Subject:   Re: HLT
Message-ID:  <200011010509.VAA44996@john.baldwin.cx>
In-Reply-To: <200010310548.WAA25053@usr02.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 31-Oct-00 Terry Lambert wrote:
>> Why doesn't the HLT instruction work in FreeBSD when I run an SMP
>> kernel? The CPU's runs really hot.. so I'm forced to use an UP
>> kernel, where the HLT instruction works, and keeps the CPU's a bit
>> colder..
> 
> It works; it's just that the idle loop doesn't call it.
> 
> The reason it doesn't call it is because the kernel is
> holding the giant lock when it enters the scheduler,
> and it's in the scheduler where the idle processing takes
> place.
> 
> Moving to actual kernel idle threads (HLT is a priviledged
> instruction) could fix this.

Err, no.  This has nothing to do with Giant, zero, zilch, nada.  Please do go
read the code before making such claims.  It has everything to do with making
sure that you don't put a CPU to sleep when there is work for it to do, and
to make sure you don't increase interrupt latency by having to unnecessarily
use an IPI to wake up a sleeping CPU so it can run a thread that suddenly
appears.  One can try hacking the code to enable hlt if one really wants it
(just change the #ifndef SMP to #ifndef SMP_XXX) but it will have a negative
effect on interrupt responsiveness when at least one CPU is idle.
 
> I think the real question is why, under normal operating
> conditions, should overheating be a problem for you?  I
> suspect the answer, as someone else pointed out, is that
> you are probably overclocking.  If not, then you either
> have marginal chips, or your heat sinks/fans are not
> properly mounted or your heat conductive gel has gone bad.

This part I agree with.  :-)

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011010509.VAA44996>