Subject: Re: Common Scheduler Framework update and question
To: Ben Harris <email@example.com>
From: Daniel Sieger <dsieger@TechFak.Uni-Bielefeld.DE>
Date: 09/28/2006 18:53:53
Content-Type: text/plain; charset=us-ascii
On Thu, Sep 28, 2006 at 05:23:20PM +0100, Ben Harris wrote:
> It seems to me that this entirely depends on how you intend to slot in=20
> different schedulers. If the intention is that they should be selected=
> at compile time, and that each scheduler should provide a function of=20
> each name, then you should rename schedcpu() and roundrobin(). If (as I=
> suspect is more likely) you plan to have them selectable at run-time,=20
> then sched_adjust() and sched_resched() will have to be (or go via)=20
> pointers, and you can keep the existing names for the existing=20
The current implementation uses a compile time option, and I intend to
leave it at that, at least for this project. OTOH, I guess it would be
nice to have the interface designed in a manner that would allow such
> >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.
> Since your entire plan is to replace the current interface, I'm not sure=
> this can really be described as a problem.
Sounds reasonable. However, I also made a version using macros without
too much pain. The only drawback I currently see is that I have to
include sched.h in kern/init_main.c which wouldn't be necessary
> >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().
> What kind of trouble?
I didn't investigate in detail, but CALLOUT_INITIALIZER_SETFUNC()
didn't like a function pointer as argument, IIRC. Maybe I should
investigate that one further.
Daniel Sieger wwwhomes.uni-bielefeld.de/dsieger
Faculty of Technology dkenblog.blogspot.com
Bielefeld University orangeflag.blogspot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (SunOS)
-----END PGP SIGNATURE-----