From owner-freebsd-smp Thu May 2 7: 1:40 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by hub.freebsd.org (Postfix) with ESMTP id A20CC37B423 for ; Thu, 2 May 2002 07:01:22 -0700 (PDT) Received: (qmail 11009 invoked from network); 2 May 2002 14:01:21 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail14.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 2 May 2002 14:01:22 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g42E1KF07540; Thu, 2 May 2002 10:01:21 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <15568.20086.979721.992191@grasshopper.cs.duke.edu> Date: Thu, 02 May 2002 10:00:23 -0400 (EDT) From: John Baldwin To: Andrew Gallatin Subject: RE: hlt when idle? Cc: freebsd-smp@FreeBSD.org Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 01-May-2002 Andrew Gallatin wrote: > > John Baldwin writes: > > > > On 01-May-2002 Andrew Gallatin wrote: > > > > > > > > > Can somebody remind me why we do not hlt in the idle loop on MP x86s? > > > Is this because a HLTed CPU is not going to notice a new runnable job > > > (possibly migrating from another CPU) until it gets an interrupt to > > > wake it up? > > > > Yes. > > This seems to be an acceptable "loss" in performance in environments > where cooling is a concern. Is there a deadlock danger? Or is it > just a performance tweak to not HLT SMPs? Would you object to making > it a sysctl (machdep.smp_idle_hlt)? Another thing that would be possible would be to try to narrow the race further by keeping track of idle cpu's and sending out IPI's when threads are made runnable. > > > Do both CPUs get clock interrupts on x86? > > > > No, the interrupts seem to be round-robin, but each clock intr is only > > sent to one CPU unlike on alpha where they are broadcast. > > So each CPU gets (1/num_cpu) * hz clock interrupts/sec? Well, I'm not sure how the interrupts are routed exactly, so I would tentatively say "roughly" that many. We ipi everyone else when we get a clock interrupt on x86 to do effective broadcast interrupts. > Drew -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "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