From owner-freebsd-arch Fri Sep 20 13:20:12 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36BAD37B41E for ; Fri, 20 Sep 2002 13:20:10 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id A961E43E65 for ; Fri, 20 Sep 2002 13:20:09 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020920202008.MJEU14454.sccrmhc02.attbi.com@InterJet.elischer.org>; Fri, 20 Sep 2002 20:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA20498; Fri, 20 Sep 2002 13:08:26 -0700 (PDT) Date: Fri, 20 Sep 2002 13:08:25 -0700 (PDT) From: Julian Elischer To: Rik van Riel Cc: Bill Huey , freebsd-arch@freebsd.org Subject: Re: New Linux threading model In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 20 Sep 2002, Rik van Riel wrote: > On Fri, 20 Sep 2002, Julian Elischer wrote: > > On Fri, 20 Sep 2002, Rik van Riel wrote: > > > There don't seem to be any O(n) loops left in or near this scheduler, > > > meaning that 1:1 threading with lots of threads becomes possible. > > > > The FreeBSD scheduler is moving towards a big rewrite but we want to > > change "one thing at a time" :-) in that area.. > > This is doable in a smallish number of steps, which don't > even need to be done in this order: > > 1) per-cpu runqueues instead of a global one, which wants ... > > 2) ... load balancer between these per-cpu queues > > 3) two runqueue arrays (current and expired) instead of > just one, which enables ... > > 4) ... event-driver priority recalculation, instead of > recalculating the priority of each task separately > I didn't sat it's not possible, it's just that the interaction between threads and KSEs on the run queue is very complicated in the current "interim" scheduler (compatible with the old process scheduler but with a huge "tumor" on the side of it to do something with threads) and there are not enough people who know the issues (I know of 3) for us to spare the time to do it now aswe are all busy on other things. The redesign can wait untill we acually have some threads to schedule :-) > These changes are probably small enough that they can be done > without the risk of destabilising anything. That would be a new peocess scheduler.. we need a new THREAD scheduler.. ie. You need to schedule threads in the kernel, while not allowing a process with a lot of threads to flood the system. This is non trivil, but we have the tools needed to do it. We just haven't done so yet.. If anyone is lookign for a grad-student project.. contact me on this one. I can give details :-) > Rik > -- > Bravely reimplemented by the knights who say "NIH". > > http://www.surriel.com/ http://distro.conectiva.com/ > > Spamtraps of the month: september@surriel.com trac@trac.org > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message