Zero-copy patch

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Feb 1 04:30:43 MST 2011


On Tue, Feb 01, 2011 at 12:17:35PM +0100, Volker Lendecke wrote:
> > Does any one have the kernel patch for zero-copy from skb
> > to IO buffer/cache? The performance of Samba using splice
> > is slowing down because of busy to copy the buffer from
> > socket.
> 
> Wait -- If I used 2 splice calls, one from TCP socket to a
> pipe and the second from the pipe to a on-disk file it still
> does a copy internally?

Hmmm. Found the following comment in relatively recent Linux
kernel source:

 *      - Destination page already exists in the address space and there
 *        are users of it. For that case we have no other option that
 *        copying the data. Tough luck.
 *      - Destination page already exists in the address space, but there
 *        are no users of it. Make sure it's uptodate, then drop it. Fall
 *        through to last case.
 *      - Destination page does not exist, we can add the pipe page to
 *        the page cache and avoid the copy.

So it seems that for normal samba file server use it should
avoid the copy.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen


More information about the samba-technical mailing list