Subject: Re: Moving scheduler semantics from cpu_switch() to kern_synch.c
To: None <garrett_damore@tadpole.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 09/22/2006 12:02:55
> > => idle() (written in C, in MI code) implements idle policy. This is
> > where we can check for new processes to run, zero free pages, etc. If
> > there is no "idle time" work to do, then cpu_idle() is called.
> >
> > => cpu_idle() does NOT loop! cpu_idle() simply does the truly MD
> > things that idle would do, e.g. call the HLT instruction or do other
> > idle-time power saving, etc. Once that special instruction has
> > finished executing, we know that something has happened (i.e. an
> > interrupt that may have caused an LWP to become runnable), so we
> > return back to idle(), which loops around again (thus checking for
> > runnable LWPs... lather, rinse, repeat).
cpu "wakeup" code and the correcponding part of idle() should be MD.
otherwise i agree.
> Yes, yes yes! I agree with all of it! So when can we do it? :-)
whenever we have enough volunteers for each of our too many ports.
(as usual :-)
i think i had some old (pre-lwp i guess) idle thread code for i386
somewhere in my home dir. i'll try to dig it up unless anyone has
newer one.
YAMAMOTO Takashi