Subject: Common Scheduler Framework update and question
To: None <>
From: Daniel Sieger <dsieger@TechFak.Uni-Bielefeld.DE>
List: tech-kern
Date: 09/28/2006 12:06:05
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,
an initial version of the scheduler framework is up and running. Some
few details can be found at this blog[1] where I'll more or less
regularly write about my efforts.

I could need some advice how to do deal with some issues best. Here's
the problem I'm currently facing: In our current implementation,
schedcpu() recomputes the process/lwp priorities and roundrobin()
causes the system to reschedule. As these two functions are highly
specific to our current scheduler scheme, they should not directly be
included within the framework. But, of course, every scheduler
implementation will have to provide functions of this kind. Thus, two
functions, sched_adjust() for schedcpu() and sched_resched() for
roundrobin() are included in the interface. The question now is what's
the best way to make our current scheduler work with the
interface. Several possibilities come to my mind:

1. I could just rename schedcpu() and roundrobin() accordingly. But I
   have some bad feelings about this approach, since it seems to me
   bit like breaking our current interface. Please tell me, if this
   would be an acceptable approach, since this would make things much
   more easy.

2. Using some kind of wrapper functions that call schedcpu() and
   roundrobin() accordingly. This seems not really acceptable to me,
   since introducing an extra function call at such a critical place
   could have an impact on system performance.

3. Using macros. This could also be done quite easily, but OTOH I
   don't know if this would be considered a clean approach.

4. Define sched_adjust() and sched_resched() as function pointers and
   let them point to schedcpu() and roundrobind(). I tried this one,
   but I ran into trouble with the callout handler that actually
   triggers the execution of schedcpu().

I'd be very glad to get some comments about which approach is probably
best, or if there is some other way to handle this I didn't thought



Daniel Sieger
Faculty of Technology
Bielefeld University
Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (SunOS)