Date: Tue, 31 Oct 2000 05:48:33 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: drony@spray.se Cc: freebsd-smp@FreeBSD.ORG Subject: Re: HLT Message-ID: <200010310548.WAA25053@usr02.primenet.com> In-Reply-To: <54839208@spray.se> from "Johan Dahlberg" at Oct 31, 2000 04:30:14 AM
next in thread | previous in thread | raw e-mail | index | archive | help
> 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. So would moving to per CPU scheduling queues, which would also result in natural processor affinity, which could be a significant win all around. The issue there is the ability to migrate queue entries and putting things on initially and pulling them off would require holding the giant lock (only one CPU could manipulate the queues at at time), as well as sending an explicit IPI to cause a lock trap to ensure that the other CPU won't try to go into the scheduler while the migration is occurring. Then each CPU could call HLT in its own scheduler loop. To finish it off, you would want negative thread group affinity, so that threads in a single process could be running on different CPUs simultaneously, for best SMP scaling. 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. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. 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?200010310548.WAA25053>