Subject: Re: Just for fun
To: Perry E. Metzger <perry@piermont.com>
From: Andrew Doran <ad@netbsd.org>
List: tech-smp
Date: 01/16/2007 10:56:54
On Mon, Jan 15, 2007 at 11:44:21AM -0500, Perry E. Metzger wrote:

> Andrew Doran <ad@netbsd.org> writes:
> > A few years back pk@ locked a few more kernel subsystems and tried running
> > the kernel unlocked to see what would happen. I repeated the test with a
> > kernel from the newlock2 branch and to my amazement it completes a kernel
> > build on a 4 way system.
> >
> > build.sh isn't so good - once it hits 'make objdir' and there's a lot of
> > intensive file system activity going it will either panic, or lock up in
> > biowait -> vnlock, somewhere around 30 to 60 seconds in.
> 
> That's pretty amazing. Should we attribute this to the low probability
> of contention in the real world,

The kernel build doesn't spend a huge amount of time in the kernel, but it
definitely produces contention. I think the majority of it is likely to
result from handling traps for zero fill and pageins.

> or to the quality of the stuff on newlock2? (I suspect a bit of both,
> which is, as you say, encouraging.)

The branch adds one more piece of the puzzle (locking around process state).
That it works comparatively well is a product of all of the locks that have
been trickling into the system for the last .. well, since 4.4BSD I think.

Andrew