Date: Wed, 23 May 2001 18:48:22 +0100 From: Brian Somers <brian@Awfulhak.org> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: Brian Somers <brian@Awfulhak.org>, freebsd-arch@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: RFC: unit_list routines Message-ID: <200105231748.f4NHmMF08217@hak.lan.Awfulhak.org> In-Reply-To: Message from Garrett Wollman <wollman@khavrinen.lcs.mit.edu> of "Wed, 23 May 2001 13:11:45 EDT." <200105231711.NAA30721@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> <<On Wed, 23 May 2001 16:52:58 +0100, Brian Somers <brian@Awfulhak.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 <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105231748.f4NHmMF08217>