Subject: Re: zbufs for NetBSD
To: None <kyle.unice@L-3com.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 08/23/2002 09:53:53
On Fri, Aug 23, 2002 at 10:10:00AM -0600, kyle.unice@L-3com.com wrote:

 > would be an inconsequential performance improvment, but for streaming video
 > on a large packet data link, zbufs could be quite an improvment.  I know
 > there are ALOT of studies and quantifications that could be done on which
 > apps would benefit most from zbufs and does NetBSD run those apps, but IMHO
 > zbufs would be a plus for NetBSD.

I think you're missing my point, though.

In NetBSD, right now, normal write(2) calls to sockets are *already*
zero-copy, all the way from user application to the wire.  It is the
default in NetBSD-current, and an option in the upcoming 1.6 release.

The only thing that is missing is a callback to userspace when the NIC
is finished with the buffer.  This could be achieved with a normal POSIX
Async I/O implementation.

As I said, this does not address read(2) on a socket.  But again, page
flipping techniques could be used here.

What I'm trying to say is that it's not really clear that a different
API like zbufs are really necessary in order to achieve full zero-copy
semantics.

Now, all that said, can you provide a reference on the zbuf API?

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>