Zero-copy patch

Jeremy Allison jra at samba.org
Tue Feb 1 10:57:10 MST 2011


On Tue, Feb 01, 2011 at 12:30:43PM +0100, Volker Lendecke wrote:
> 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.

Yes, it seems so, but when I tested it in practice it made
things worse. I don't know why :-(.

If Jacky can figure that out it would be a great help to
everyone.

Jeremy.


More information about the samba-technical mailing list