On Fri, Jun 15, 2012 at 18:07, Ariane van der Steldt wrote: > I'm wondering if > if (curcpu()->ci_schedstate.spc_schedflags & SPCF_SHOULDYIELD) > preempt(NULL); > shouldn't be a special function in kern_sched, I suspect its useful for > more parts of the kernel (although I wouldn't know which ones).
In other places, we simply call yield when we estimate that enough (or too much) work has been done. Less precise, but it works.