Modify UDP to use sosend_dgram() instead of sosend(). This allows
for signicantly optimized UDP socket I/O when using a single UDP socket from many threads or processes that share it, by avoiding significant locking and other overhead in the general sosend() path that isn't necessary for simple datagram sockets. Specifically, this change results in a significant performance improvement for threaded name service in BIND9 under load. Suggested by: Jinmei_Tatsuya at isc dot org
This commit is contained in:
parent
b673e7b7eb
commit
59b8854eee
@ -1118,6 +1118,7 @@ struct pr_usrreqs udp_usrreqs = {
|
||||
.pru_disconnect = udp_disconnect,
|
||||
.pru_peeraddr = udp_peeraddr,
|
||||
.pru_send = udp_send,
|
||||
.pru_sosend = sosend_dgram,
|
||||
.pru_shutdown = udp_shutdown,
|
||||
.pru_sockaddr = udp_sockaddr,
|
||||
.pru_sosetlabel = in_pcbsosetlabel
|
||||
|
Loading…
Reference in New Issue
Block a user