diff options
author | Eric Dumazet <[email protected]> | 2015-05-20 10:59:02 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2015-05-21 18:55:32 -0400 |
commit | 946f9eb226c296da0d6c630bdad282ca11d77f60 (patch) | |
tree | e57418581cf0adc129548c9427730f70b84045da /tools/perf/scripts/python/syscall-counts.py | |
parent | f5af1f57a2914e290de40e2c93716da8885c4965 (diff) |
tcp: improve REUSEADDR/NOREUSEADDR cohabitation
inet_csk_get_port() randomization effort tends to spread
sockets on all the available range (ip_local_port_range)
This is unfortunate because SO_REUSEADDR sockets have
less requirements than non SO_REUSEADDR ones.
If an application uses SO_REUSEADDR hint, it is to try to
allow source ports being shared.
So instead of picking a random port number in ip_local_port_range,
lets try first in first half of the range.
This gives more chances to use upper half of the range for the
sockets with strong requirements (not using SO_REUSEADDR)
Note this patch does not add a new sysctl, and only changes
the way we try to pick port number.
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Marcelo Ricardo Leitner <[email protected]>
Cc: Flavio Leitner <[email protected]>
Acked-by: Flavio Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions