socket: Provide socket owner cpuid hint
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 25 Sep 2014 13:51:14 +0000 (21:51 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 28 Sep 2014 12:49:12 +0000 (20:49 +0800)
commit8ba7dcb1cbd864984e670341b66aba012aa29bb0
tree6c7df14fea5b5db2d576ba92a2dfff888384a211
parentdb923e214471f555958af9bf3279f793853a1a69
socket: Provide socket owner cpuid hint

If the cpuid hint could not be provided or the cpuid hint does not make
sense, -1 will be returned as cpuid hint, e.g. TCP listen sockets w/o
SO_REUSEPORT.

This helps avoiding unnecessary IPIs and contention on receiving sockbuf
token.
sys/kern/uipc_socket.c
sys/netinet/ip_output.c
sys/netinet/raw_ip.c
sys/netinet/tcp_usrreq.c
sys/sys/socket.h