Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jul 2000 17:43:05 -0400 (EDT)
From:      Bosko Milekic <bmilekic@dsuper.net>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        net@FreeBSD.ORG
Subject:   Re: mbuf refcnt and sendfile
Message-ID:  <Pine.BSF.4.21.0007151737130.20497-100000@jehovah.technokratis.com>
In-Reply-To: <20000715142703.E25571@fw.wintelcom.net>

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

On Sat, 15 Jul 2000, Alfred Perlstein wrote:

> > >I was wondering what your thoughts on this are?
> > 
> >    I thought it seemed very clever.
> 
> The linked list method or the pointer refcount method?

	Alfred, the linked list method turns out to be simpler overall, and
  much cleaner at that. Here's why:

  * If you implement the counter in one of the mbufs (as I suggested in my
  previous mbuf), you'll have to deal with extra hysterics for what
  concerns mbufs referring to external buffers. You'll have one mbuf which
  has the actual counter, and the rest which hold pointers to that counter.
  This method is awful (I've given it some thought) because if you free one
  such mbuf and it happens to be the one holding the counter, well... you
  get the picture.

  * If you implement the counter externally, you're really going back to
  what already existed and what this patch tries to move away from. You
  might as well keep the global.

  Cheers,
  Bosko.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" 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.0007151737130.20497-100000>