Subject: Re: zbufs for NetBSD
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 08/23/2002 00:17:37
On Thu, Aug 22, 2002 at 01:04:37PM -0600, kyle.unice@L-3com.com wrote:
> I imagine that someone previously has looked into putting zbuf (zero-copy
> mbufs) support into NetBSD.  I am interested in knowing what the state of
> the project is.   A search of the net reveals little except for VxWorks
> support for zbufs.  
> 
> I would think that the MMU, socket syscalls, and mbuf code would need to be
> modified.  The upside is that zbufs provide a network performance advantage.

Doubtful - I'm not even sure they are advantageous in vxWorks.
(or rather other changes would have such a large benefit that they
could easily outweigh the (apparant) advantages of the zbuf interface).
Remember modern systems can copy aligned data very quickly - especially
if it the data is already in the cache.

For a unix system careful use of page loaning can help - but only
if the process side doesn't write into the loaded page (because that
would require a copy-on-write allocation which would end up being more
expensive that the original copy).
The big gain from page loaning probbaly comes with mmaped file - since
the data can be transmitted without ever getting into the cpu cache (and
displacing other useful data).  Hardware checksum calculation will
make a much bigger difference here...

	David

-- 
David Laight: david@l8s.co.uk