From owner-freebsd-arch Wed May 23 1:15:51 2001 Delivered-To: freebsd-arch@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id B150037B424 for ; Wed, 23 May 2001 01:15:45 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.3/8.11.3) with ESMTP id f4N8FhY08267; Wed, 23 May 2001 09:15:43 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f4N8FfC20001; Wed, 23 May 2001 09:15:41 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200105230815.f4N8FfC20001@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Peter Wemm Cc: Brian Somers , Poul-Henning Kamp , Garrett Wollman , freebsd-arch@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: RFC: unit_list routines In-Reply-To: Message from Peter Wemm of "Tue, 22 May 2001 19:23:29 PDT." <20010523022329.ADF97380A@overcee.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2001 09:15:41 +0100 From: Brian Somers Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > The unit_list is an ordered list of ranges where the count is > > implicit and a resource id or type field have no meaning. The idea > > is to be able to allocate and release unit numbers relatively > > frequently without obfuscating things with redundant information or > > including odd things such bus hierarchies and unit counts. > > That is exactly what the rman stuff is for. The rman stuff seems to be overkill: o It uses a global mutex when allocating resources. o It has a local mutex for waiting on resources (and an RF_ACTIVE flag). o It supports RF_SHARABLE/RF_TIMESHARE resources (I guess this isn't an overhead, just unnecessary). o It's implemented in terms of ``struct resource *''s, most of which inappropriate. o It mucks about with device structs when reserving resources unit_list just concerns itself with allocating a bunch of int ranges. Do you really think it's appropriate to try to re-use the rman stuff for what I want to do ? > Cheers, > -Peter > -- > Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au > "All of this is for nothing if we don't go to the stars" - JMS/B5 -- 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