DragonFly commits List (threaded) for 2011-12
git: pru_send: Allow non-NULL address parameter to be passed
Author: Sepherosa Ziehau <email@example.com>
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
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(-)
DragonFly BSD source repository