Re: kernel thread support - LWP's

Benjamin LaHaise (kernel@kvack.org)
Thu, 15 Jul 1999 13:15:00 -0400 (EDT)


On Thu, 15 Jul 1999, Nate Tuck wrote:

> Since you've obviously talked to a lot of good people on this, I was
> wondering if you could talk about the only issue I haven't heard you bring
> up which is frequently brought up by the LWP/user-thread-scheduler folks.
> What about kernel run-queue length? It seems that I've heard the argument
> made that LWP's keep you from spending a long time in the kernel scheduler,
> which I could see might actually be a good thing.

If run queue length is an issue, then you're using too many threads.
Under what reasonable circumstances will you have more than a couple of
threads ready for scheduling? I see threads helping in two ways:
providing a means of concurency during blocking io (read: disk access),
and utilising SMP. Using an event driven programming model should be able
to get peak performance with a number of threads equal to the number of
cpus + a few spares for blocking io. The only time there should be more
active threads than can be run is when an io request has just completed,
and that should trigger only a short lived response. Does that make
sense?

-ben

-
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/