Subject: Re: newlock
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Andrew Doran <ad@NetBSD.org>
List: tech-kern
Date: 09/04/2006 03:38:11
On Sun, Sep 03, 2006 at 06:42:10PM -0700, Garrett D'Amore wrote:

> By the way, some years ago (many years ago) Sun was faced with the
> challenge of converting old drivers to an MP safe architecture.  They
> required drivers to report that they were MP safe (D_MP in the driver
> flags), and after a release or two, they dropped all support for drivers
> that failed this check.   It might make an interesting model for how to
> get there.
> 
> Of course, the first thing we need is an infrastructure (in terms of
> API) to support it.  Even if internals of the API are not implemented in
> an MP safe way, as long as they can be converted to be MP safe later,
> then folks can start updating drivers to whatever new API we expose _today_.

There are parts of the kernel that are seemingly in fairly good shape as far
as MP safety goes, UVM for example. One of the bigger pains is going to be
device drivers as you say. Did you see my message earlier today?

http://mail-index.netbsd.org/tech-smp/2006/09/03/0000.html

That would give us a bit of breathing space to work on the core. Networking
is going to be a challenge. I assume that we can do a similar trick with the
kernel_lock initially.

> Maybe I need to look more closely at newlock etc. to see if there is
> anything I can do to help.  I've just been bogged down with other stuff
> lately.

Yes please.

Thanks,
Andrew