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

git: pru_send: Allow non-NULL address parameter to be passed


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 4 Dec 2011 05:29:57 -0800 (PST)

commit 7b7dc575a8224f533cec23b942a0aef41b88835c
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Sun Dec 4 21:21:51 2011 +0800

    pru_send: Allow non-NULL address parameter to be passed
    
    Currently the passed in address is copied into a newly allocated
    memory (grr, additional blocking kmalloc), and the PRUS_FREEADDR
    will be set so that protocol thread could know when to free the
    address.
    
    Before this change netperf UDP_STREAM (unconnected socket) could
    only do ~200Kpps (w/ -m 18), now it could do ~990Kpps (w/ -m 18).
    This gives ~500% performance improvement for tiny UDP packet TX.
    The improvement is not as good as the connected socket, which is
    ~600%, mainly because of the additional memory allocation for
    the address.  We _may_ further optimize out the address allocation.

Summary of changes:
 sys/kern/uipc_msg.c      |   12 ++++++++++--
 sys/kern/uipc_socket.c   |    7 +------
 sys/net/netmsg.h         |    1 +
 sys/netinet/tcp_usrreq.c |    5 +++--
 sys/netinet/udp_usrreq.c |    5 ++++-
 5 files changed, 19 insertions(+), 11 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7b7dc575a8224f533cec23b942a0aef41b88835c


-- 
DragonFly BSD source repository



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