diff options
author | Eric Garver <e@erig.me> | 2017-01-05 20:22:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-06 20:56:48 -0500 |
commit | df560056d960a3e164c179d89770d5a51b798537 (patch) | |
tree | c7ef7484e35828d01338bcb4b715733b1f2e5498 /net/sctp/ulpqueue.c | |
parent | 89eb9835b2657a902adb8d5e31f721a8004726b5 (diff) |
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/ulpqueue.c')
0 files changed, 0 insertions, 0 deletions