Re: kernel thread support - LWP's

Peter Desnoyers (pjd@fred001.dynip.com)
Thu, 15 Jul 1999 14:04:13 -0400 (EDT)


Donald Sharp wrote:
>
> I have never understood this arguement. With LWP's you have to spend
> time in 2 schedulers: The kernel's and the Thread libraries. I guess
> they might be able to claim that the thread libraries scheduler is much
> much faster than the kernel's scheduler, so you end up with a bonus.

Splitting an N-job scheduling task into an M-job low-level scheduling
tasks and a single N/M-job high-level scheduling task is a win.
In theory.

In practice it depends. There's a list traversal in schedule() that would
speed up if you have a whole bunch of threads and you split the scheduling
into two levels, but it's probably going to take a lot of runnable tasks
before this loop dominates the other overhead, and at that point a bit of
overhead in schedule() is probably the least of your worries.

-- 
............................................................................
 Peter Desnoyers 
 162 Pleasant St.         (617) 661-1979          pjd@fred.cambridge.ma.us
 Cambridge, Mass. 02139   (978) 461-0402 (work)   pjd@giga-net.com 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/