From owner-freebsd-arch Wed Jul 17 2:36:58 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 C669137B400 for ; Wed, 17 Jul 2002 02:36:54 -0700 (PDT) Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64DBA43E64 for ; Wed, 17 Jul 2002 02:36:54 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g6H9arp08510; Wed, 17 Jul 2002 02:36:53 -0700 (PDT) (envelope-from rizzo) Date: Wed, 17 Jul 2002 02:36:53 -0700 From: Luigi Rizzo To: Peter Wemm Cc: arch@FreeBSD.ORG Subject: Re: proposed changes to kern_switch.c and kern_synch.c Message-ID: <20020717023653.B8351@iguana.icir.org> References: <20020717004750.A7375@iguana.icir.org> <20020717092210.934423915@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020717092210.934423915@overcee.wemm.org>; from peter@wemm.org on Wed, Jul 17, 2002 at 02:22:10AM -0700 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 there is a lot of overload in the use of priority fields to store both process state and priority info. Decoupling them is non-trivial, and so we decided to leave the old scheduler unmodified, and our alternate scheduler right now tries to keep the relevant information updated in a consistent way (please be patient, the code will come out in a couple of days, but i thought the overall design is more important than the details, which besides might have bugs). Rather than proposing a massive change all at once, my idea was to play safe and just start with moving some code from one file to another, and then revise things one step at a time. You are right about the schedcpu1() thing, in -stable the block of code moved there is slightly smalle i think. Yes, the alternate scheduler is in kern_switch_*.c, providing replacement for the various chooseproc() and friends, which are accessed through function pointers initialized according to the scheduler being chosen. cheers luigi On Wed, Jul 17, 2002 at 02:22:10AM -0700, Peter Wemm wrote: ... > > Anyways, does the partitioning of functionalities sound reasonable ? > > Please be a little careful. There has been a lot of talk about splitting > the current scheduler into an event driven system rather than a 'run once a > second' thing. This was something along the lines of splitting the current > schedcpu stuff and the various other glue into 3 parts. I think the gist > of it was to have each process do a slight incremental priority adjustment > each time it used up its entire quantum, a slight adjustment at wakeup time, > and the periodic system load factoring code would still run periodically. > > You haven't given much details about how you're intending to implement your > alternate scheduler, or even which part you're intending to provide an > alternative for (I'm guessing a different kern_switch, ie: alterantive > run queues, chooseproc^H^H^H^Hkse, setrunqueue(), etc) > > Some other comments.. You seem to have seperate the comments about the > digital decay magic in schedcpu() from the code that does the magic. In > fact, things like cexp[] etc are shared between kern_switch (schedcpu1) and > kern_synch (loadav) etc. Are you sure the partitioning is correct? > > Maybe *everything* other than the msleep/wakeup/etc related stuff should move? > ie: setrunnable() (which uses updatepri()) etc move as well? > > Cheers, > -Peter > -- > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com > "All of this is for nothing if we don't go to the stars" - JMS/B5 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message