From owner-freebsd-current@FreeBSD.ORG Wed Jul 9 00:43:43 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 26F2C37B401 for ; Wed, 9 Jul 2003 00:43:43 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90CB143FB1 for ; Wed, 9 Jul 2003 00:43:42 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38ldtos.dialup.mindspring.com ([209.86.247.28] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19a9by-0007WJ-00; Wed, 09 Jul 2003 00:43:35 -0700 Message-ID: <3F0BC75B.12BF42CF@mindspring.com> Date: Wed, 09 Jul 2003 00:42:19 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Andy Farkas References: <20030709083947.L11189-100000@hewey.af.speednet.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4897589df3de9503c9acc669b1b19e78da8438e0f32a48e08350badd9bab72f9c350badd9bab72f9c cc: 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: Wed, 09 Jul 2003 07:43:43 -0000 Andy Farkas wrote: > On Tue, 8 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. > > Is this what's happenning to me an my setiathomes? The command: sysctl machdep.cpu_idle_hlt will tell you. If it says 1, then it may be the problem. If it says 0, then it's not the problem. You can explicitly set it to zero to disable halting in the idle loop. If you do this, your machine is likely to run ~20% hotter (depending on the CPU type), since HLT'ing an idle CPU tends to cool it off. If this fixes your problem, then it's likely that what's happening is that one or more of your CPU's are being idled until the clock or some other interrupt fires, at which point in time your setiathome processes are probably not the highest priority, as other things with higher priority have gotten in the run queue ahead of them. If this is the case, then Julian's suggested fix of an IPI to one or more idle CPU's when a process becomes ready-to-run will most likely be necessary to avoid this situation. If it doesn't "fix" your problem, then it's obviously something else... 8-). -- Terry