Re: [Question] Explanation of zero-copy networking

Jamie Lokier (lk@tantalophile.demon.co.uk)
Tue, 8 May 2001 18:20:55 +0200


Alan Cox wrote:
> > so there's still single copy for write() of a mmap()ed page?
>
> An mmap page will go direct to disk.

Looking at the 2.4.4 code, mmap() of file followed by write() to socket
will copy the data once.

I could be mistaken (only glanced at the code quickly) but I base that
on the only call to ->sendpage being through sendfile.

So yes, there's a single copy overhead for mmap()+write().

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/