Subject: Re: So I'll bite. M:N w/o SA - how? (stick to 1:N with Pth!)
To: None <tech-kern@netbsd.org>
From: Bucky Katz <bucky@picovex.com>
List: tech-kern
Date: 02/22/2007 12:58:21
"Greg A. Woods" <woods@weird.com> writes:

> It's inherently much safer to run most thread-using code without
> preemptive concurrency if at all possible.

I did a wc on our code base yesterday. The current version of the
application runs just shy of 1.1 million lines, not including optional
components.

It's designed to use preemptive concurrency.

It's in operation on products in the field now.

I do not have the luxury of rewriting the application. Not my
brief. My brief is to make it run efficiently on a NetBSD system on
ARM hardware.

It has been doing so for a number of months now. It took adding a
significant number of features to NetBSD to accomplish that, but it
does work efficiently.

A productive discussion at this point focuses on how it will continue
to run efficiently on NetBSD once I have to move to a release that
does not have M:N threads _without modification to the application_.

Rebasing our work on 4.0 defers that problem but doesn't eliminate it,
as we have this optimistic belief that we'll be running on NetBSD for
a long time into the future.

The focus then is on one of two possible paths: a) improve the 1:1
thread implementation to the point where there is not a performance
problem or b) find a way to get M:N threads back into -current that
doesn't involve SA and is acceptable in the context of MP scaling.

Others are persuing a. This is the thread where we discuss b.