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

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Dec 4 05:31:10 PST 2011


commit 7b7dc575a8224f533cec23b942a0aef41b88835c
Author: Sepherosa Ziehau <sephe at 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





More information about the Commits mailing list