On Wed, 28 Jun 2000, Andrew Gallatin wrote:
> YES! This is wonderful news.
>
> I started coding device drivers on Digital UNIX and have long missed
> this feature. I can't count the number of times I've gotten 90% of
> the way through doing something with ext mubfs & thought to myself
> "oh hell, now what am I going to do for an m_ext.ext_ref() function?"
I can imagine. As I've previously mentionned, I'm thinking of
adopting NetBSD's reference idea, as it seems very handy here. What it
basically assumes is that if you're going to increase the reference count
to an object, that you know one of the mbufs also referencing that object
(since what you're doing is probably "copying" the data without having to
actually perform a memory-to-memory copy -- the reason we have reference
counts in the first place). So, if you know the mbuf referencing the same
object, you will pass it to the macro and it will "increase a reference
count" for it itself. What actually occurs is that the m_ext structure
holds a forward/backward pointer (in the style of doubly-linked list) and
is linked to all the other mbufs referencing the same object. This would
isolate the referencing of external objects to the mbuf subsystem, such
that callers don't have to worry about it at all, and can essentially get
rid of the ext_ref() routine alltogether.
> On a less enthusiastic note, the amount of whitespace changes make it
> very difficult to eyeball your diff. Could you re-roll your diffs with
> -b (to ignore your whitespace changes).
Yeah, I made some "appearence/consistency/cleanliness" changes in
/sys/sys/mbuf.h in order to maintain consistency and ensure easy
readability of the final product. However, for readability purposes, I
posted the no-whitespace-changes diff to the same place:
http://www.technokratis.com/code/mbuf/
I should have done this immediately; thanks for the advice! Hope this
helps. :-)
> ------------------------------------------------------------------------------
> Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin
> Duke University Email: [EMAIL PROTECTED]
> Department of Computer Science Phone: (919) 660-6590
Cheers,
Bosko.
--
Bosko Milekic * Voice/Mobile: 514.865.7738 * Pager: 514.921.0237
[EMAIL PROTECTED] * http://www.technokratis.com/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message