Subject: Re: Scheduler API changes for yamt-idlelwp
To: None <dsieger@TechFak.Uni-Bielefeld.DE>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 02/18/2007 19:06:03
> Hi folks,
> Here's a proposed patch to introduce a new scheduler API in
> Yamamoto-san's idle lwp branch. It is a slightly modified/improved
> version of the patch I send a couple of weeks ago (see [1]).
> 
> Note: schedcpu() will need some further work as some parts are
> scheduler dependent and others are not. For example, schedcpu()
> currently takes care of updating p->p_estcpu and p->p_pctcpu. While
> the former is highly 4BSD scheduler specific, the latter is a POSIX
> requirement. Simply splitting schedcpu() into two distinct functions
> is not an option, since it has a negative impact on performance.
> 
> Backwards compatibility is also an issue here. Since we can't simply
> get rid of p_estcpu, we may need to retain schedcpu() even for other
> schedulers, which is not very nice.

if you think any schedulers need it for now, why bother to move it
into sched_4bsd.c?  i don't think it's a good idea to duplicate these
complicate code for each schedulers.

YAMAMOTO Takashi