Subject: Re: Moving scheduler semantics from cpu_switch() to kern_synch.c
To: None <firstname.lastname@example.org>
From: YAMAMOTO Takashi <email@example.com>
Date: 09/21/2006 12: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.)