]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add soreceive_dgram(9), an optimized socket receive function for use by
authorRobert Watson <rwatson@FreeBSD.org>
Wed, 2 Jul 2008 23:23:27 +0000 (23:23 +0000)
committerRobert Watson <rwatson@FreeBSD.org>
Wed, 2 Jul 2008 23:23:27 +0000 (23:23 +0000)
commit5df3e83946d992ea2424c93b91550061264c1254
treef93fb0d7ca2098d63cd9cb5c25ccd3e6b4f9b4d6
parent0a2fe173657ba6df0cc46f64e22609c21b0902ad
Add soreceive_dgram(9), an optimized socket receive function for use by
datagram-only protocols, such as UDP.  This version removes use of
sblock(), which is not required due to an inability to interlace data
improperly with datagrams, as well as avoiding some of the larger loops
and state management that don't apply on datagram sockets.

This is experimental code, so hook it up only for UDPv4 for testing; if
there are problems we may need to revise it or turn it off by default,
but it offers *significant* performance improvements for threaded UDP
applications such as BIND9, nsd, and memcached using UDP.

Tested by: kris, ps
sys/kern/uipc_socket.c
sys/netinet/udp_usrreq.c
sys/sys/socketvar.h