Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 2004 01:02:23 -0600 (CST)
From:      Mike Silbersack <silby@silby.com>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/net if_tap.c if_tun.c
Message-ID:  <20041104005726.G16834@odysseus.silby.com>
In-Reply-To: <200410311739.i9VHdkTf054648@repoman.freebsd.org>
References:  <200410311739.i9VHdkTf054648@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



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