Date: Wed, 17 Jul 2002 02:22:10 -0700 From: Peter Wemm <peter@wemm.org> To: Luigi Rizzo <rizzo@icir.org> Cc: arch@freebsd.org Subject: Re: proposed changes to kern_switch.c and kern_synch.c Message-ID: <20020717092210.934423915@overcee.wemm.org> In-Reply-To: <20020717004750.A7375@iguana.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo wrote: > On Wed, Jul 17, 2002 at 12:43:35AM -0700, Peter Wemm wrote: > > Luigi Rizzo wrote: > > > > > In order to make this work, it is convenient to have all > > > scheduler-specific functions and data structures in a > > > single file (kern_switch*.c), and generic support in > > > another one (kern_synch.c). I believe this was also the original > > > BSD design in partitioning the code between the two files. > > > > You would be mistaken there. kern_switch.c is new and has only existed > > very recently. kern_switch.c came about as a C implementation of code that > > used to be embedded inside i386/swtch.s. It has taken on a life of its own > > now though. :-/ > > good to know! > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020717092210.934423915>