From owner-freebsd-arch Wed May 23 10:48:34 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 6F6C237B496 for ; Wed, 23 May 2001 10:48:25 -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 f4NHmNY11720; Wed, 23 May 2001 18:48:23 +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 f4NHmMF08217; Wed, 23 May 2001 18:48:22 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200105231748.f4NHmMF08217@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Garrett Wollman Cc: Brian Somers , freebsd-arch@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: RFC: unit_list routines In-Reply-To: Message from Garrett Wollman of "Wed, 23 May 2001 13:11:45 EDT." <200105231711.NAA30721@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2001 18:48:22 +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 > < said: > > > The way I see it, holding and releasing mutexes will introduce > > contention between consumers that only want to maintain a [completely > > private] sparce array. > > I think the usual watchword is ``Don't optimize initialization.'' Maybe, but pessimising for no gains seems odd. > > Allocating a ``struct resource'' munges a completely separate > > resource (allocated units) in with all of the existing resources > > I'm having a bit of difficulty understanding the point you're trying > to make here. It's a general interface; you need a subset of that > functionality. Your resource is not ``munged [...] in with all of the > existing resources'' -- each resource is managed separately, through > its rman structure. > > > of lists and backwards pointers to achieve something that means > > nothing in the context of these allocated units. > > Those lists and backwards pointers are not there for the benefit of > clients, and should be treated as opaque. Actually, the whole `struct > resource' should be treated as opaque, although because accessors are > provided as macros rather than functions it can't be made literally > so. But they're required for the benefit of clients - so that they can allocate existing resources, add and remove other resources etc. I want a list of number ranges, not a resource management subsystem that happens to manage number ranges for individual resources in a way that could be bent to my needs. > > Using bits when there are large numbers of units gets awkward. > > Just wrap it in macros. I almost posted an implementation with my > last message, but decided that since it was so trivial it would be > almost insulting for me to do so. Not true - I'm too thick skinned to be insulted :oI I'll look at a macro implementation. > -GAWollman -- 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