Subject: Re: FreeBSD's /dev on NetBSD
To: Hans Petter Selasky <>
From: Tonnerre <>
List: tech-kern
Date: 08/14/2005 01:14:31
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


On Sun, Aug 14, 2005 at 12:09:59AM +0200, Hans Petter Selasky wrote:
> > NetBSD's SMP kernel is under a big-lock, so this isn't a problem for
> > the time being.
> This almost sounds like the Giant lock on FreeBSD. But then, actually=20
> splnet/splx and simple_lock/simple_unlock does not have any effect at all?

It does, on multiprocessor systems.

> What happens on NetBSD if a process calls "tsleep()" while holding a=20
> simple_lock()? Is there any code to do extra checking like on FreeBSD ?

A simplelock doesn't affect splx levels.

> I've heard that NetBSD is very against mutexes. Is this true? Will NetBSD=
> always use one lock for the whole kernel?

Mutexes are too heavy for a lot of things, that's why we have simplelocks.
However, sometimes you do need them, in which case they're ok. It's always
a decision between too low and too high lock contention - both of them may
severely harm your performance.

NetBSD is currently heading for eliminating the LOCK_KERNEL madness.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.1 (NetBSD)