DragonFly BSD
DragonFly kernel List (threaded) for 2004-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: lkwt in DragonFly

From: Bill Huey (hui) <billh@xxxxxxxxxxxxxxxxx>
Date: Wed, 11 Feb 2004 08:32:35 -0800

On Tue, Feb 10, 2004 at 10:14:18AM -0800, Matthew Dillon wrote:
> :idem for linux, see: http://people.redhat.com/drepper/nptl-design.pdf
> :the short summary is that fixing your kernel to work nicely with 1:1
> :is easier then getting the hairy details of n:m properly working.
> :
> :I'd like to know why for dragonfly n:m would be better.
> :
> :-- 
> :Sten Spans
>     n:m is always better then 1:1 because thread switches within each
>     virtual cpu (where the virtual cpu is represented by a single user 
>     process) require no context switch into the kernel at all.
>     n:m is definitely harder to do, but that doesn't mean it shouldn't be
>     done.  It's a great goal for DFly, IMHO.  The paper you are quoting is 
>     simply an opinion, like any paper.  It is not necessarily correct.

The criticism of that is that those kind of context operations aren't
common and to optimize for this is a distraction from the main issues
such as IO event handling, etc...

Most folks that need that kind of context switching performance generally
write their own context manipulating stuff within the application in
question. Also, thread migration is a serious pain in systems like that.
Instead, with a 1:1 system you'd have a global policy driven by a system
scoped scheduler. Things are much simpler, hence software engineering
issues are less problematic for fringe cases like thread suspension, 
potentially funky message thread wake issues, etc... That would allow
for a usable pthreads library to come about quicker.

That's my two cents. :)


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]