List Info

Thread: Moving scheduler semantics from cpu_switch() to kern_synch.c




Moving scheduler semantics from cpu_switch() to kern_synch.c
user name
2006-09-21 03:05:26
> Because I don't cpu_idle to return to the scheduler
code with
> curlwp == NULL.  I think the only place in the kernel
that curlwp
> can be NULL is in cpu_idle.  the noreturn was a brain
fart.

maybe it's better to introduce idle threads, so that
cpu_idle can be independent from any real threads?

> > 	- it's better to make cpu_idle and maybe
cpu_switchto be called
> > 	  without sched_lock held.
> 
> It'd be nice but I don't don't see how to do that.

because need_resched and corresponding check in cpu_idle()
would be
MD operations, we can easily make it safe without
sched_lock.
(well, it should be easy for i386 at least.
i'm not sure about other ports.)

YAMAMOTO Takashi
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )