Subject: Re: sched_changepri
To: None <ad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 03/06/2007 04:47:23
> > > 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.
> 
> Perhaps not remrunqueue() but at the point where the LWP is picked and set
> running, so mi_switch(). What was I thinking is that we only want to do
> kernel preemption for LWPs running with priority above the user/kernel
> level. Were you thinking of something else?

i'm not sure in which case kernel preemption should happen.
i'm just wondering what's wrong with restoring it in userret().

YAMAMOTO Takashi