Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2000 07:37:39 +0100
From:      sthaug@nethelp.no
To:        drony@spray.se
Cc:        freebsd-smp@freebsd.org
Subject:   Re: HLT
Message-ID:  <97644.972974259@verdi.nethelp.no>
In-Reply-To: Your message of "Tue, 31 Oct 2000 04:30:14"
References:  <54839208@spray.se>

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..

This was discussed extensively some months ago, and as far as I
remember no completely satisfactory solution was identified. The
problem is that the UP code halts the CPU when it is idle, while SMP
code does not.

I (and several others) have been running with the following simple
patch to /sys/i386/i386/swtch.s. It seems to do the job here. Mind
you, this is for 4.x. All bets are off for -current.

Steinar Haug, Nethelp consulting, sthaug@nethelp.no
----------------------------------------------------------------------
*** swtch.s.orig	Sun Jan  2 22:36:22 2000
--- swtch.s	Sun May 14 12:19:00 2000
***************
*** 251,259 ****
  
  ENTRY(default_halt)
  	sti
! #ifndef SMP
  	hlt					/* XXX:	 until a wakeup IPI */
! #endif
  	ret
  
  /*
--- 251,259 ----
  
  ENTRY(default_halt)
  	sti
! /* #ifndef SMP */
  	hlt					/* XXX:	 until a wakeup IPI */
! /* #endif */
  	ret
  
  /*


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?97644.972974259>