Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jul 2000 12:25:03 -0400 (EDT)
From:      Bosko Milekic <bmilekic@dsuper.net>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        net@FreeBSD.ORG, dg@FreeBSD.ORG, dillon@FreeBSD.ORG
Subject:   Re: mbuf refcnt and sendfile
Message-ID:  <Pine.BSF.4.21.0007151222010.19154-100000@jehovah.technokratis.com>
In-Reply-To: <20000715065506.Y25571@fw.wintelcom.net>

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


On Sat, 15 Jul 2000, Alfred Perlstein wrote:

> http://www.freebsd.org/cgi/query-pr.cgi?pr=19866
> 
> David, I'm pretty sure you didn't like the 'fix' for the mbuf
> cluster refcount presented in this PR (linking all copies using
> a doubly linked list), I have presented an alternative:
> 
>      Instead of keeping them in a linked list there should be an int/char *
>      in the mbuf header that works the same way mclrefcnt does.  Instead
>      of managing a linked list all one has to do is copy the pointer into
>      the new mbuf header and increment it, and decrease it on free, when
>      it's zero the deref code is called.

	This takes away from the transparency of the system and further adds
  the necessity of having to splimp() for something as simple as checking
  whether an mbuf's ext_buf is referenced by more than one object. If you
  keep the counter outside of the isolated mbuf (which is what you're
  suggesting with the pointer idea), then you have to splimp() before you
  check the value of the referred counter.

> I was wondering what your thoughts on this are?
> 
> I also had an idea to save on sf_buf's in sendfile:
> 
>   Forget about them, set the m_ext->ext_buf to point directly at the
>   vm_page_t backing the mbuf, you don't need the extra indirection.

	If the ext_buf referencing remains transparent, then you don't really
  need the extra indirection management, as far as I know! But I'm not
  sure! David probably knows this interface WAAAY better (he wrote it!) :-)

> I think that could work if you did a vm_page_wire and pmap_qenter
> for each mbuf ref callback and a vm_page_unwire and pmap_qremove
> for each mbuf free callback.
> 
> With the callback reducing optimization for mbuf clusters mentioned
> first I think we may have pretty good optimization.
> 
> What do you guys think?
> 
> -- 
> -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
> "I have the heart of a child; I keep it in a jar on my desk."
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
> 
> 


--
 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-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.0007151222010.19154-100000>