Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 2009 23:08:05 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern uipc_socket.c src/sys/netinet tcp_usrreq.c src/sys/sys socketvar.h
Message-ID:  <200906222308.n5MN8OpU085517@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
andre       2009-06-22 23:08:05 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_socket.c 
    sys/netinet          tcp_usrreq.c 
    sys/sys              socketvar.h 
  Log:
  SVN rev 194672 on 2009-06-22 23:08:05Z by andre
  
  Add soreceive_stream(), an optimized version of soreceive() for
  stream (TCP) sockets.
  
  It is functionally identical to generic soreceive() but has a
  number stream specific optimizations:
  o does only one sockbuf unlock/lock per receive independent of
    the length of data to be moved into the uio compared to
    soreceive() which unlocks/locks per *mbuf*.
  o uses m_mbuftouio() instead of its own copy(out) variant.
  o much more compact code flow as a large number of special
    cases is removed.
  o much improved reability.
  
  It offers significantly reduced CPU usage and lock contention
  when receiving fast TCP streams.  Additional gains are obtained
  when the receiving application is using SO_RCVLOWAT to batch up
  some data before a read (and wakeup) is done.
  
  This function was written by "reverse engineering" and is not
  just a stripped down variant of soreceive().
  
  It is not yet enabled by default on TCP sockets.  Instead it is
  commented out in the protocol initialization in tcp_usrreq.c
  until more widespread testing has been done.
  
  Testers, especially with 10GigE gear, are welcome.
  
  MFP4:   r164817 //depot/user/andre/soreceive_stream/
  
  Revision  Changes    Path
  1.336     +196 -0    src/sys/kern/uipc_socket.c
  1.189     +6 -0      src/sys/netinet/tcp_usrreq.c
  1.170     +3 -0      src/sys/sys/socketvar.h



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