From owner-freebsd-smp Thu Apr 27 8:34:36 2000 Delivered-To: freebsd-smp@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id E071B37B62E for ; Thu, 27 Apr 2000 08:34:32 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.10.1/8.10.1) id e3RFXoI01828; Thu, 27 Apr 2000 11:33:50 -0400 (EDT) Date: Thu, 27 Apr 2000 11:33:50 -0400 (EDT) From: Luoqi Chen Message-Id: <200004271533.e3RFXoI01828@lor.watermarkgroup.com> To: bright@wintelcom.net, djb@ifa.au.dk Subject: Re: hlt instructions and temperature issues Cc: freebsd-smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > On Thu, Apr 27, 2000 at 07:32:46AM -0700, Alfred Perlstein wrote: > > http://www.freebsd.org/FAQ/misc.html#AEN3892 > > I was not asking about UP FreeBSD. I know that linux and FreeBSD behave > more or less the same in that case. I was specifically referring to the SMP > case. I am also not into OS advocacy AT ALL! I am simply concerned about > the temperature in my FreeBSD box and a similar Linux box is the only thing > sensible I can compare to. I am sorry if my question looked like an > advocacy issue. > > I also don't need to consult the faq if I want to know how hot or cool a > freebsd UP box is. I have one here (single celeron, same clock frequency as > the SMP boxes) which is only 29 degrees Celcius. > > I did search my own archive of freebsd-smp and I also searched using > the freebsd.org search engine. The only relevant mail I found was from Remy > Nonnenmacher, asking about the hlt instruction in the SMP case. > > As far as I found, Remy never got an answer. > > Regards, > > Dave Boers. > > > -- > djb@ifa.au.dk d.j.boers@tn.utwente.nl > PGP key: ftp://relativity.student.utwente.nl:/pub/pgpkeys/djb.asc > No, we don't use hlt instruction on SMP. We could, but I guess nobody bothered to work on it. It should be fairly straight forward: prior to hlt, lower TPR priority so that this processor is first in line to receive an interrupt. If you are interested, you may give the follwing patch a try. -lq Index: swtch.s =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/swtch.s,v retrieving revision 1.91 diff -u -r1.91 swtch.s --- swtch.s 2000/03/29 06:15:38 1.91 +++ swtch.s 2000/04/27 15:31:11 @@ -258,9 +258,14 @@ ENTRY(default_halt) sti -#ifndef SMP - hlt /* XXX: until a wakeup IPI */ +#ifdef SMP +#ifdef CHEAP_TPR + movl $0, lapic_tpr +#else + andl $~APIC_TPR_PRIO, lapic_tpr +#endif /** CHEAP_TPR */ #endif + hlt ret /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message