From owner-freebsd-current@FreeBSD.ORG Mon Oct 9 02:06:59 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from localhost.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id EF1EA16A40F; Mon, 9 Oct 2006 02:06:56 +0000 (UTC) (envelope-from davidxu@freebsd.org) From: David Xu To: freebsd-current@freebsd.org Date: Mon, 9 Oct 2006 10:06:54 +0800 User-Agent: KMail/1.8.2 References: <2fd864e0610080423q7ba6bdeal656a223e662a5d@mail.gmail.com> <20061009002200.GM793@funkthat.com> <20061008181618.N69745@demos.bsdclusters.com> In-Reply-To: <20061008181618.N69745@demos.bsdclusters.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200610091006.54219.davidxu@freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Attilio Rao , John-Mark Gurney , Kip Macy , Ivan Voras Subject: Re: [PATCH] MAXCPU alterable in kernel config - needs testers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 09 Oct 2006 02:06:59 -0000 On Monday 09 October 2006 09:18, Kip Macy wrote: > > Wouldn't having a single run queue lock still serialize the cpu's when > > getting a thread to run? Don't we really need a per cpu run queue, and > > then have a scheduler that puts threads on the cpu's run queues? > > Balancing run queues has overhead as well. From what I've seen having > threads bouncing back and forth between the sleep queue and the run > queue because sleep / wakeup is overused (see lockmgr) is a bigger deal > right now. Moving to multiple run queues is inappropriate at this time. > > > -Kip If single sched_lock is not removed, it even is not worthy of trying mutliple run queues, since any time you spent under sched_lock will be scaled to N times, where N is the number of CPU, in worst case. This makes load-balance a bit useless. David Xu