From owner-freebsd-current@FreeBSD.ORG Tue Jul 8 15:37:31 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 2E4BE37B401 for ; Tue, 8 Jul 2003 15:37:31 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9555F43F3F for ; Tue, 8 Jul 2003 15:37:30 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 17843 invoked from network); 8 Jul 2003 22:37:29 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 8 Jul 2003 22:37:29 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h68MbSGI097022; Tue, 8 Jul 2003 18:37:28 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 08 Jul 2003 18:37:42 -0400 (EDT) From: John Baldwin To: Julian Elischer cc: FreeBSD current users Subject: RE: SMP and setrunnable()- scheduler 4bsd 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: Tue, 08 Jul 2003 22:37:31 -0000 On 08-Jul-2003 Julian Elischer wrote: > It looks tp me that if we make a thread runnable > and there is a processor in the idle loop, the idle processor should be > kicked in some way to make it go get the newly runnable thread. > > If the processors are halting in the idle loop however, it may take > quite a while for the new work to be noticed.. > (possibly up to milliseconds I think) > > Is there a mechanism to send an IPI to particular processors? > or is it just broadcast? > > > I think we would be better served to alter idle_proc(void *dummy) > (or maybe choosethread()) to increment or decrement a count > of idle processors (atomically of course) so that > setrunnable (or it's lower parts) can send that IPI > and get the idle processor into actioan as soon as a thread is > available. > > I have not seen any such code but maybe I'm wrong.... This is why HLT is not enabled in SMP by default (or at least was, it may be turned on now). Given that the clock interrupts are effectively broadcast to all CPU's one way or another for all arch's (that I know of), you will never halt more than the interval between clock ticks on any CPU. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/