Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2002 02:36:53 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        arch@FreeBSD.ORG
Subject:   Re: proposed changes to kern_switch.c and kern_synch.c
Message-ID:  <20020717023653.B8351@iguana.icir.org>
In-Reply-To: <20020717092210.934423915@overcee.wemm.org>; from peter@wemm.org on Wed, Jul 17, 2002 at 02:22:10AM -0700
References:  <20020717004750.A7375@iguana.icir.org> <20020717092210.934423915@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020717023653.B8351>