diff options
author | Eric Garver <e@erig.me> | 2017-01-06 04:22:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-07 04:56:48 +0300 |
commit | df560056d960a3e164c179d89770d5a51b798537 (patch) | |
tree | c7ef7484e35828d01338bcb4b715733b1f2e5498 /net/sctp | |
parent | 89eb9835b2657a902adb8d5e31f721a8004726b5 (diff) | |
download | linux-df560056d960a3e164c179d89770d5a51b798537.tar.xz |
udp: inuse checks can quit early for reuseport
UDP lib inuse checks will walk the entire hash bucket to check if the
portaddr is in use. In the case of reuseport we can stop searching when
we find a matching reuseport.
On a 16-core VM a test program that spawns 16 threads that each bind to
1024 sockets (one per 10ms) takes 1m45s. With this change it takes 11s.
Also add a cond_resched() when the port is not specified.
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
0 files changed, 0 insertions, 0 deletions