From owner-freebsd-arch Wed May 23 8:23:47 2001 Delivered-To: freebsd-arch@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 0DA6037B42C for ; Wed, 23 May 2001 08:23:44 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA29635; Wed, 23 May 2001 11:23:32 -0400 (EDT) (envelope-from wollman) Date: Wed, 23 May 2001 11:23:32 -0400 (EDT) From: Garrett Wollman Message-Id: <200105231523.LAA29635@khavrinen.lcs.mit.edu> To: Brian Somers Cc: freebsd-arch@FreeBSD.ORG Subject: Re: RFC: unit_list routines In-Reply-To: <200105230815.f4N8FfC20001@hak.lan.Awfulhak.org> References: <20010523022329.ADF97380A@overcee.netplex.com.au> <200105230815.f4N8FfC20001@hak.lan.Awfulhak.org> 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 rman stuff seems to be overkill: > o It uses a global mutex when allocating resources. ...which you can ignore... > o It has a local mutex for waiting on resources (and an RF_ACTIVE flag). ...which you can also ignore... > o It supports RF_SHARABLE/RF_TIMESHARE resources (I guess this isn't > an overhead, just unnecessary). ...which you can also ignore... > o It's implemented in terms of ``struct resource *''s, most of which > inappropriate. Inappropriate in what way? > o It mucks about with device structs when reserving resources ...which you can just pass as a null pointer.... > Do you really think it's appropriate to try to re-use the rman stuff > for what I want to do ? Given that the code is already there, and is already compiled into every kernel, and (I hope) already has the bugs worked out, I would suggest that it would not be a bad thing. OTOH, if all you are doing is keeping an array of one-bit flags, and having an arbitrarily-large upper limit on the number of devices is acceptable, it's probably cheaper to just do it with a few macros. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message