DragonFly BSD
DragonFly commits List (threaded) for 2011-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: tcp: Let sosendtcp() call tcp_usrreq.pru_send asynchronous


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Oct 2011 05:19:16 -0700 (PDT)

commit 0ad8e15ea0059b225c9aa255b844cb9ec48d5227
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Sun Oct 23 20:55:16 2011 +0800

    tcp: Let sosendtcp() call tcp_usrreq.pru_send asynchronous
    
    - Embed netmsg_pru_send into mbuf.m_hdr, which shares the space with
      netmsg_pru_packet.
    - Use the newly added netmsg_pru_send in mbuf to perform asynchronous
      pru_send.  For asynchronous pru_send, PRUS_NOREPLY is added, which
      prevents pru_send to reply the message.
    - In sosendtcp(), if we have more data to call pru_send, we call it
      asynchronously.  The last piece of data or OOB data will still be
      passed to pru_send synchronously.
    
    On Phenom 9550 (4 core, 2.2GHz):
    8 parallel netperf -H 127.0.0.1 (4 runs, unit: Mbps)
    
    old  5863.85  5773.13  5534.14  5506.72
    new  6735.98  6903.13  6971.89  7056.66
    
    This give ~20% performance improvement.
    
    It has no obvious impact on 1000BaseT or 100baseTX network performace.

Summary of changes:
 sys/kern/uipc_msg.c      |   18 ++++++++++++++++++
 sys/kern/uipc_socket.c   |   10 +++++++++-
 sys/net/netmsg.h         |    1 +
 sys/netinet/tcp_usrreq.c |   12 ++++++++----
 sys/sys/mbuf.h           |    7 ++++++-
 sys/sys/socketops.h      |    3 +++
 6 files changed, 45 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0ad8e15ea0059b225c9aa255b844cb9ec48d5227


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]