From owner-freebsd-current@FreeBSD.ORG Fri Jun 20 23:43:18 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E0B837B401 for ; Fri, 20 Jun 2003 23:43:18 -0700 (PDT) Received: from adicia.telenet-ops.be (adicia.telenet-ops.be [195.130.132.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 780B143FB1 for ; Fri, 20 Jun 2003 23:43:17 -0700 (PDT) (envelope-from bruno.van.den.bossche@pandora.be) Received: from localhost (localhost.localdomain [127.0.0.1]) by adicia.telenet-ops.be (Postfix) with SMTP id D67E838135; Sat, 21 Jun 2003 08:43:15 +0200 (MEST) Received: from Noisy.localhost.localdomain (D5E0018A.kabel.telenet.be [213.224.1.138]) by adicia.telenet-ops.be (Postfix) with SMTP id 678103813F; Sat, 21 Jun 2003 08:43:15 +0200 (MEST) Date: Sat, 21 Jun 2003 08:43:15 +0200 From: Bruno Van Den Bossche To: rhett@alasir.com Message-Id: <20030621084315.582e64b1.bruno.van.den.bossche@pandora.be> In-Reply-To: <20030621014742.13635.qmail@web21505.mail.yahoo.com> References: <20030621014742.13635.qmail@web21505.mail.yahoo.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: SMP & CPU_SUSP_HLT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2003 06:43:19 -0000 On Sat, 21 Jun 2003 02:47:42 +0100 (BST) RMH wrote: > Hello gentlemen, > > it seems CPU_SUSP_HLT does nothing for SMP kernels. > > i386/i386/machdep.c: > > #ifdef SMP > static int cpu_idle_hlt = 0; > #else > static int cpu_idle_hlt = 1; > #endif > > It's noted that when enabled it will result in about 4.2% > loss in performance while doing buildworld. I haven't > checked with that, but I tested single-threaded applications > to suffer for about 2%, what shouldn't be a big difference. > > Beyond power consumption, suspend on HLT may solve some > overheating issues common for multiprocessor systems. At > least, it does so in my case. > > I suggest to remove #ifdef SMP, and place a warning into > NOTES. Let people decide. People can decide :-) You can set 'machdep.cpu_idle_hlt: 1' with sysctl. This will enable the hlt's for you. On single cpu-systems this is set by default. On SMP-systems it isn't, because of the "loss" in performance you already mentioned. -- Bruno Weinberg's Principle: An expert is a person who avoids the small errors while sweeping on to the grand fallacy.