Subject: Re: newlock
To: Andrew Doran <ad@NetBSD.org>
From: Garrett D'Amore <firstname.lastname@example.org>
Date: 09/03/2006 19:47:33
Andrew Doran wrote:
> 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?
> 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.
I hadn't seen this message. I didn't even know about tech-smp@ until
you just pointed it out to me, so thanks!
Your suggestion does seem like a good starting point, though.
As for shutdown hooks, I think we should create a new API, and for the
old one just use the kernel lock. Deprecate the old for MP safe drivers.
And, I suppose I should start thinking about networking and SMP. It
shouldn't be much worse.
>> 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
> Yes please.
Okay, will do. As soon as I have cycles to do so.
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134 Fax: 951 325-2191