ipdemux: Better initial so_port distribution for non-power-of-2 ncpus
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 27 Oct 2015 12:40:24 +0000 (20:40 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 29 Oct 2015 01:26:03 +0000 (09:26 +0800)
commit5cbeb1a5fcf2c044fa27ac7f2f8d9c1fa4074aa4
treeec1238d53dd52ba3bb7a950fbfd3902e561db920
parent5aaa7016a5796af988e90dad0a3cc2fc015d3e1c
ipdemux: Better initial so_port distribution for non-power-of-2 ncpus

The measured effect of this change on 2-ways E5-2600v2 with Intel 82599
(10Gbe) using tools/kq_connect_client -u, i.e. UDP socket/connect/send/
close before initiating a TCP connection:
- Connect rate increases by ~15Kconns/s; we are now doing 315Kconns/s.
- This also improves tools/kq_connect_client w/o -u a little bit.
sys/netinet/ip_demux.c