From owner-freebsd-current@FreeBSD.ORG Tue Jul 8 15:25:30 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 27F0C37B401 for ; Tue, 8 Jul 2003 15:25:30 -0700 (PDT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD85C43F93 for ; Tue, 8 Jul 2003 15:25:29 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (rwcrmhc13) with ESMTP id <20030708222529015007as45e>; Tue, 8 Jul 2003 22:25:29 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA24243 for ; Tue, 8 Jul 2003 15:25:28 -0700 (PDT) Date: Tue, 8 Jul 2003 15:25:27 -0700 (PDT) From: Julian Elischer To: FreeBSD current users Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 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:25:30 -0000 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....