On Mon, Aug 29, 2016 at 07:10:48PM +0200, Mike Belopuhov wrote:
> Due to a recent change in -current the socket sending routine
> has started producing small data packets crossing memory page
> boundary.  This is not supported by Xen and kernels with this
> change will experience broken bulk TCP transmit behaviour.
> We're working on fixing it.

For the same reason some old i386 machines from 2006 and 2005 have
performance problems when sending data with tcpbench.

em 82573E drops to 200 MBit/sec output, 82546GB and 82540EM do only
10 MBit anymore.

With the patch below I get 946, 642, 422 MBit/sec output performance
over these chips respectively.

Don't know wether PAGE_SIZE is the correct fix as I think the problem
is more related to the network chip than to the processor's page
size.

bluhm

Index: kern/uipc_socket.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/kern/uipc_socket.c,v
retrieving revision 1.155
diff -u -p -r1.155 uipc_socket.c
--- kern/uipc_socket.c  25 Aug 2016 14:13:19 -0000      1.155
+++ kern/uipc_socket.c  29 Aug 2016 18:02:24 -0000
@@ -544,7 +544,7 @@ m_getuio(struct mbuf **mp, int atomic, l
 
                resid = ulmin(resid, space);
                if (resid >= MINCLSIZE) {
-                       MCLGETI(m, M_NOWAIT, NULL, ulmin(resid, MAXMCLBYTES));
+                       MCLGETI(m, M_NOWAIT, NULL, ulmin(resid, PAGE_SIZE));
                        if ((m->m_flags & M_EXT) == 0)
                                goto nopages;
                        mlen = m->m_ext.ext_size;

Reply via email to