cvs commit: src/sys/net if_tap.c if_tun.c
Mike Silbersack
silby at silby.com
Wed Nov 3 23:02:27 PST 2004
On Sun, 31 Oct 2004, Gleb Smirnoff wrote:
> glebius 2004-10-31 17:39:46 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/net if_tap.c if_tun.c
> Log:
> Utilize m_uiotombuf() in device write method, instead of home-grown
> implementation. This also gives a performance improvement, because
> m_uiotombuf() utilizes clusters.
>
> Approved by: julian (mentor)
> MFC after: 1 month
This is only somewhat related to your commit, but since I'm thinking of
it, I'll throw it out there...
One of the main disappointments I had when I wrote m_uiotombuf is that I
didn't have time to use it where it really should be used - in
uipc_socket.c:sosend.
The reason it's not there is because of the zero-copy send code, which I
didn't have time to untangle. If someone had the time, it would be great
to take the zero copy code, integrate it *into* m_uiotombuf, then replace
the huge mess in sosend with a simple call to m_uiotombuf. This would
make sosend much easier to read, and provide the benefits of zero-copy
writes for many more places throughout the kernel.
Whether or not zero copy send is a performance win is only a tiny side
issue; if it's not actually a performance win on a particular system, then
hey, at least there would be one clear place to #ifdef it out. :)
Mike "Silby" Silbersack
More information about the cvs-src
mailing list