Subject: Re: the path from nathanw_sa -> newlock2
To: Thor Lancelot Simon <>
From: Aaron J. Grier <>
List: current-users
Date: 02/12/2007 13:42:25
On Mon, Feb 12, 2007 at 03:31:05PM -0500, Thor Lancelot Simon wrote:
> On Mon, Feb 12, 2007 at 12:00:21AM -0800, Aaron J. Grier wrote:
> > what surprises me is that instead of fixing a known list of issues
> > discovered over the last couple years, the choice was made to trade
> > everything out with a new codebase with new undiscovered bugs.
> Well, you were certainly entirely free, over the past several years as
> various people tried and failed to fix the SA threads, to step forward
> and fix them yourself.  It is, after all, a volunteer project.

I'm just trying to trace the path between the two; not argue with
decisions beyond my scope of expertice.

let me attempt to answer my own questions and others can tell me where
my comprehension is faulty.

Q: why weren't the M:N bugs able to be fixed?
A: the M:N code was complex and difficult to maintain.  nobody except
   Nathan understood it, and he didn't have time to work on it.

Q: if the M:N code was so complicated, why was it ever merged into
A: at the time, NetBSD had no kernel threading support whatsoever, and
   it was becoming clear that user-land libraries like pth and proven
   threads weren't going to cut it.  given the choice between
   experimental M:N threading code and no threading code, the choice was

Q: why was M:N switched out completely for 1:1 without any overlap
A: resources were not available to deal with porting the existing M:N
   code to the new kernel locking primitives due to the complexity of
   the existing M:N code.  plus the M:N code was buggy.

Q: new locking primitives?
A: the newlock2 branch started as a project by Andrew Doran to increase
   the amount of parallel code paths in the kernel to avoid the "big
   lock" which doesn't scale well.  given that multi-core processors are
   the current standard for many architectures, this was deemed of great
   importance by core.

  Aaron J. Grier | "Not your ordinary poofy goof." |
              "silly brewer, saaz are for pils!"  --  virt