From owner-freebsd-smp Sat Nov 23 14:19:45 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA15913 for smp-outgoing; Sat, 23 Nov 1996 14:19:45 -0800 (PST) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA15901 for ; Sat, 23 Nov 1996 14:19:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by root.com (8.7.6/8.6.5) with SMTP id OAA01895; Sat, 23 Nov 1996 14:17:52 -0800 (PST) Message-Id: <199611232217.OAA01895@root.com> X-Authentication-Warning: implode.root.com: Host localhost [127.0.0.1] didn't use HELO protocol To: Steve Passe cc: freebsd-smp@freefall.freebsd.org, Peter Wemm Subject: Re: SMP -current merge In-reply-to: Your message of "Sat, 23 Nov 1996 14:47:16 MST." <199611232147.OAA19699@clem.systemsix.com> From: David Greenman Reply-To: dg@Root.COM Date: Sat, 23 Nov 1996 14:17:52 -0800 Sender: owner-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >I think I just made an important breakthru on SMP efficiency. It has always >bugged me that many things take longer to do with 2 CPUs running than with >just 1 active. While looking for the current SMP "brokenness" (still haven't >got a clue...) I noticed in sys/kern/init_main.c:smp_idleloop() the line: > > if (whichqs || whichrtqs || whichidqs) { > >appears to look in the queue of idle procs. my debugs seem to show >the 2nd CPU switching back and forth from one idle proc to the other >as a result. It appears that the 2nd CPU is spending ALOT of >time grabbing the lock, switching idle procs, and releaseing the lock >again! This seems like it is both unnecessary and wasting bus cycles. Uhh, the "idle" queue shouldn't have anything on it unless there is an "idprio" process running. If this patch truely makes a difference, then there is something very wrong with the handling of whichidqs somewhere. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project