From owner-freebsd-net Sat Jul 15 14:40:49 2000 Delivered-To: freebsd-net@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 37A6337BBD2 for ; Sat, 15 Jul 2000 14:40:44 -0700 (PDT) (envelope-from bmilekic@dsuper.net) Received: from modemcable009.62-201-24.mtl.mc.videotron.net ([24.201.62.9]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0FXR003RDDJU1B@falla.videotron.net> for net@FreeBSD.ORG; Sat, 15 Jul 2000 17:40:42 -0400 (EDT) Date: Sat, 15 Jul 2000 17:43:05 -0400 (EDT) From: Bosko Milekic Subject: Re: mbuf refcnt and sendfile In-reply-to: <20000715142703.E25571@fw.wintelcom.net> X-Sender: bmilekic@jehovah.technokratis.com To: Alfred Perlstein Cc: net@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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