Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2000 14:09:59 -0400 (EDT)
From:      Bosko Milekic <bmilekic@dsuper.net>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-hackers@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: mbuf re-write(s): v 0.2: request-for-comments
Message-ID:  <Pine.BSF.4.21.0006281358010.2856-100000@jehovah.technokratis.com>
In-Reply-To: <14681.63578.312644.776689@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

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: gallatin@cs.duke.edu
> Department of Computer Science		Phone: (919) 660-6590

 Cheers,
 Bosko.
--
 Bosko Milekic  *  Voice/Mobile: 514.865.7738  *  Pager: 514.921.0237
    bmilekic@technokratis.com  *  http://www.technokratis.com/




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0006281358010.2856-100000>