summaryrefslogtreecommitdiff
path: root/net/sched/cls_bpf.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-02-11 16:28:49 -0800
committerDavid S. Miller <davem@davemloft.net>2016-02-12 05:28:32 -0500
commit1580ab63fc9a03593072cc5656167a75c4f1d173 (patch)
tree5a8fe8b98df62f6bc8ae18b1aec8a7215622c628 /net/sched/cls_bpf.c
parent3134b9f019f2604f05fd65a2c2d4e57193f7ddfb (diff)
tcp/dccp: better use of ephemeral ports in connect()
In commit 07f4c90062f8 ("tcp/dccp: try to not exhaust ip_local_port_range in connect()"), I added a very simple heuristic, so that we got better chances to use even ports, and allow bind() users to have more available slots. It gave nice results, but with more than 200,000 TCP sessions on a typical server, the ~30,000 ephemeral ports are still a rare resource. I chose to go a step further, by looking at all even ports, and if none was available, fallback to odd ports. The companion patch does the same in bind(), but in opposite way. I've seen exec times of up to 30ms on busy servers, so I no longer disable BH for the whole traversal, but only for each hash bucket. I also call cond_resched() to be gentle to other tasks. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_bpf.c')
0 files changed, 0 insertions, 0 deletions