tcp_plb_suspend_rto_sec specifies the base duration to suspend PLB repathing after an RTO triggers a rehash, pausing PLB for a random duration in [1x, 2x) of this value. Currently, it defaults to 60, suspending PLB for 60 - 120 seconds. ECN-PLB normally detects congestion via ECN before an RTO occurs, so stopping PLB upon RTO rarely becomes an issue. However, even under ECN-PLB, 60 - 120 seconds is unnecessarily long and lowers fairness when occasional RTOs happen. Moreover, Generic PLB introduced by the next patch runs alongside occasional tail-drop and probe-induced RTOs, where suspending PLB for 60 - 120 seconds effectively disables it. On the other hand, setting tcp_plb_suspend_rto_sec to 0 allows flows rescued off a blackholed link by an RTO to be immediately rehashed back onto the dead path upon subsequent congestion or probe losses. A 5-second base duration (5 - 10 second pause) keeps both ECN-PLB and Generic PLB responsive without causing immediate re-entry thrashing onto blackholed links. Let's lower the default value to 5. Note that the link-repair-time guidance in ip-sysctl.rst is also removed, as this setting balances blackhole cooldown against PLB responsiveness rather than link repair time. Signed-off-by: Kuniyuki Iwashima --- Documentation/networking/ip-sysctl.rst | 5 ++--- net/ipv4/tcp_ipv4.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst index 671011c74e14..dffcec335a77 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -1413,12 +1413,11 @@ tcp_plb_suspend_rto_sec - INTEGER having PLB repath onto a connectivity "black hole", after an RTO a TCP connection suspends PLB repathing for a random duration between 1x and 2x of this parameter. Randomness is added to avoid concurrent rehashing - of multiple TCP connections. This should be set corresponding to the - amount of time it takes to repair a failed link. + of multiple TCP connections. Possible Values: 0 - 255 - Default: 60 + Default: 5 tcp_plb_cong_thresh - INTEGER Fraction of packets marked with congestion over a round (RTT) to diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index f2a5c8f3bf9d..14ba61845f49 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -3528,7 +3528,7 @@ static int __net_init tcp_sk_init(struct net *net) net->ipv4.sysctl_tcp_plb_enabled = 0; /* Disabled by default */ net->ipv4.sysctl_tcp_plb_idle_rehash_rounds = 3; net->ipv4.sysctl_tcp_plb_rehash_rounds = 12; - net->ipv4.sysctl_tcp_plb_suspend_rto_sec = 60; + net->ipv4.sysctl_tcp_plb_suspend_rto_sec = 5; /* Default congestion threshold for PLB to mark a round is 50% */ net->ipv4.sysctl_tcp_plb_cong_thresh = (1 << TCP_PLB_SCALE) / 2; -- 2.56.1.915.g69d5ec7298-goog