Date: Sat, 15 Jul 2000 06:55:06 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: net@freebsd.org Cc: dg@freebsd.org, dillon@freebsd.org Subject: mbuf refcnt and sendfile Message-ID: <20000715065506.Y25571@fw.wintelcom.net>
next in thread | raw e-mail | index | archive | help
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. 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. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000715065506.Y25571>