Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2001 11:23:32 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: RFC: unit_list routines 
Message-ID:  <200105231523.LAA29635@khavrinen.lcs.mit.edu>
In-Reply-To: <200105230815.f4N8FfC20001@hak.lan.Awfulhak.org>
References:  <peter@wemm.org> <20010523022329.ADF97380A@overcee.netplex.com.au> <200105230815.f4N8FfC20001@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 23 May 2001 09:15:41 +0100, Brian Somers <brian@Awfulhak.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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105231523.LAA29635>