Date: Mon, 22 Jan 2007 15:59:23 +0100 From: Andre Oppermann <andre@freebsd.org> To: Andrey Chernov <ache@freebsd.org>, John Baldwin <jhb@FreeBSD.org>, Andre Oppermann <andre@FreeBSD.org>, src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_socket.c Message-ID: <45B4D14B.20102@freebsd.org> In-Reply-To: <20070121203506.GA32483@nagual.pp.ru> References: <200611021745.kA2HjSZC018731@repoman.freebsd.org> <200701121206.47308.jhb@freebsd.org> <20070121203506.GA32483@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrey Chernov wrote: > On Fri, Jan 12, 2007 at 12:06:46PM -0500, John Baldwin wrote: >> On Thursday 02 November 2006 12:45, Andre Oppermann wrote: >>> andre 2006-11-02 17:45:28 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/kern uipc_socket.c >>> Log: >>> Use the improved m_uiotombuf() function instead of home grown sosend_copyin() >>> to do the userland to kernel copying in sosend_generic() and sosend_dgram(). >>> >>> sosend_copyin() is retained for ZERO_COPY_SOCKETS which are not yet supported >>> by m_uiotombuf(). >>> >>> Benchmaring shows significant improvements (95% confidence): >>> 66% less cpu (or 2.9 times better) with new sosend vs. old sosend (non-TSO) >>> 65% less cpu (or 2.8 times better) with new sosend vs. old sosend (TSO) >>> >>> (Sender AMD Opteron 852 (2.6GHz) with em(4) PCI-X-133 interface and receiver >>> DELL Poweredge SC1425 P-IV Xeon 3.2GHz with em(4) LOM connected back to back >>> at 1000Base-TX full duplex.) >>> >>> Sponsored by: TCP/IP Optimization Fundraise 2005 >>> MFC after: 3 month >> This breaks writes of 0 bytes (e.g. write(s, NULL, 0)) to sockets because >> m_getm2(NULL, 0, ...) returns NULL and thus m_uiotombuf() returns NULL and >> sosend_*() now return EFAULT. sosend_copyin() correctly handles this case >> since it always allocates at least one mbuf. I'm not sure if m_uiotombuf() >> is at fault or if something else is, so I'll let you fix it. This explains >> the recent breakage of kcheckpass (KDE screen saver password checker) on >> current, and possibly other things as well. >> >> Also, you've introduced another regression in that if the m_get2m() fails it >> should be returning ENOBUFS and not EFAULT to userland. The comments in >> sosend_*() about 'EFAULT being the only possible error' are obviously >> wrong. :) > > Is there any progress in fixing this bug? Just fixed. The regression test passes and I hope KDE too. -- Andre
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45B4D14B.20102>