Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2012 22:44:00 +0200
From:      Andre Oppermann <andre@freebsd.org>
To:        Andre Oppermann <andre@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r241703 - head/sys/kern
Message-ID:  <50806A10.4070703@freebsd.org>
In-Reply-To: <201210182022.q9IKMHFa016360@svn.freebsd.org>
References:  <201210182022.q9IKMHFa016360@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18.10.2012 22:22, Andre Oppermann wrote:
> Author: andre
> Date: Thu Oct 18 20:22:17 2012
> New Revision: 241703
> URL: http://svn.freebsd.org/changeset/base/241703
>
> Log:
>    Remove double-wrapping of #ifdef ZERO_COPY_SOCKETS within
>    zero copy specialized sosend_copyin() helper function.

Note that I'm not saying zero copy should be used or is even
more performant than the optimized m_uiotombuf() function.
Actually there may be some real bit-rot to zero copy sockets.
I've just started looking into it.

Note that zero copy isn't entirely true either as it marks
the page as COW.  So when the userspace application reuses
the memory it is copied anyway.  Also the overhead of doing
the VM magic and mbuf attachment of a VM page isn't free
either.  To really benefit from it an application has to be
written with COW in mind and not reuse the memory that was
just written to the socket.  For non-aware applications it
may be a net performance loss overall.

Also I don't like the name zero-copy-socket as it promises
too much for those not into socket, mbuf and VM magic.
I'd rather call it cow-socket or something like that as it
describes much better what is actually happening behind the
scenes.

-- 
Andre




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50806A10.4070703>