Re: [Question] Explanation of zero-copy networking

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Tue May 08 2001 - 11:20:55 EST


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/



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:13 EST