From owner-freebsd-arch Sun Sep 24 14: 1:58 2000 Delivered-To: freebsd-arch@freebsd.org Received: from Awfulhak.org (tun.AwfulHak.org [194.242.139.173]) by hub.freebsd.org (Postfix) with ESMTP id E416B37B424; Sun, 24 Sep 2000 14:01:43 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.0/8.11.0) with ESMTP id e8OKuvC15873; Sun, 24 Sep 2000 21:56:57 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.0/8.11.0) with ESMTP id e8OKrJx29096; Sun, 24 Sep 2000 21:53:19 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200009242053.e8OKrJx29096@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: mjacob@feral.com Cc: Brian Somers , Greg Lehey , Chuck Paterson , Archie Cobbs , Joerg Micheel , Frank Mayhar , John Baldwin , Mark Murray , FreeBSD-arch@FreeBSD.org, brian@Awfulhak.org Subject: Re: Mutexes and semaphores (was: cvs commit: src/sys/conf files src/sys/sys random.h src/sys/dev/randomdev hash.c hash.h harvest.c randomdev.c yarrow.c yarro) In-Reply-To: Message from Matthew Jacob of "Sun, 24 Sep 2000 09:37:27 PDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 24 Sep 2000 21:53:19 +0100 From: Brian Somers Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > I agree - the idea of recursive mutices evil and should go, but the > > idea of an owner should not. It's nice to be able to write code that > > KASSERTs that it already owns a given mutex. > > I'm not sure I agree. Having lived through Solaris hell with recursive mutex > panics, I rather like the BSD/OS approach. > > Yes, possibly allows for sloppy coding. If you get rid of this, though, you > can extend the switchover and pain for SMP at least a year. Maybe a whinge rather than an ASSERT in the mutex code would be more appropriate. I've had recursive mutex panics in Solaris, and it meant I was doing something wrong. A panic was a bit harsh, but it still led me to note that I was misusing the kstat stuff and made me fix my code - something I wouldn't have done if it wasn't pointed out for me. > -matt -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message