From owner-freebsd-current Mon Mar 27 13:30:26 2000 Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 11EC737BCE5 for ; Mon, 27 Mar 2000 13:30:24 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e2RLsFT08784; Mon, 27 Mar 2000 13:54:15 -0800 (PST) Date: Mon, 27 Mar 2000 13:54:15 -0800 From: Alfred Perlstein To: Matthew Dillon Cc: Daniel Eischen , Nate Williams , nms@otdel-1.org, freebsd-current@FreeBSD.ORG Subject: Re: Is there spinlocks/semaphores available for drivers? Message-ID: <20000327135414.M21029@fw.wintelcom.net> References: <200003272008.MAA42799@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200003272008.MAA42799@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Mar 27, 2000 at 12:08:33PM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Matthew Dillon [000327 12:36] wrote: > > : > :There's a paper that describes how Solaris transitioned from spl()s > :to mutexes. ISTR they created one mutex for each splxxx. I'll have > :to find this and re-read it. > : > :-- > :Dan Eischen > > I think we're using a slightly different mechanism... our spl*()'s > are actually interrupt bit masks. That is, any single spl*() call > may mask several interrupt sources. Turning a mask with five or six > bits set in it into a set of mutexes is a very expensive proposition. I think you're thinking this: /-----int 1 spl -<---> int 2 \-----int 3 spl messing with several mutexes, instead consider: int 1 >---\ int 2 >---->-- splmutex int 3 >---/ Where a single mutex is shared by several interrupts. There's also this to consider: proc0: splaaa(); splbbb(); proc1: splbbb(); splaaa(); deadlock. Which needs to be worked out somehow. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message