Subject: Re: sched_changepri
To: None <ad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 03/02/2007 01:08:43
> On Sun, Feb 25, 2007 at 05:21:22PM +0900, YAMAMOTO Takashi wrote:
>
> > - why doesn't sched_changepri() change l_priority if it was < PUSER?
>
> If the LWP has received a priority boost while in the kernel and is waiting
> to run it shouldn't get dropped until it has run.
thanks for explanation.
isn't it better to have a flag to indicate if an lwp is boosted or not,
and kill l_priority?
> Right now the drop in
> priority takes place in userret(). I think that should be moved back into
> remrunqueue() once cpu_switch() is eliminated.
i think userret() is a better place to unboost an lwp than remrunqueue().
if it was in remrunqueue() and we support in-kernel preemption,
an lwp can be preempted immediately after scheduled.
YAMAMOTO Takashi