From patchwork Tue Aug 6 03:05:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 264842 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46FEF2C0040 for ; Tue, 6 Aug 2013 13:05:21 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753751Ab3HFDFR (ORCPT ); Mon, 5 Aug 2013 23:05:17 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:61504 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753566Ab3HFDFP (ORCPT ); Mon, 5 Aug 2013 23:05:15 -0400 Received: by mail-pa0-f45.google.com with SMTP id bg4so143195pad.4 for ; Mon, 05 Aug 2013 20:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:mime-version; bh=t4OIRfH149GUOngl4/EF0+ttYS9lSynZF81o/zaYWOU=; b=Na8ravnbsPMVOQy18B7nq18cD69ujqN+CUTgRI9QtDNy6boeDfxyaFdmGqvEgFPAMj RRUTG09sVsuGr9OUuOBoNPP5ZBF/payMLkF3bWWN16mMxw3U+kbaX5uOPFlBbV1SB0M+ Ie5BCNC43lPs5rLFXD4G1ykRd2T4sQpnXszK7i8XuNIjSA/0t7Z2IIU125+xcSFGPzjf lWFYryD0UbtVKfFCjIeKRybHIdgHBG3s2U1Xff6cldgvUny/drtXZ0bL+jscomKvK23N I2LIRrrWuuSdl0oyw5zHmq+HIOmf3XHPVvm5XNZ0jJvGvfSWfYAoFMxLWi65hGrwL027 NI6g== X-Received: by 10.68.189.133 with SMTP id gi5mr25746399pbc.49.1375758314997; Mon, 05 Aug 2013 20:05:14 -0700 (PDT) Received: from [172.19.244.3] ([172.19.244.3]) by mx.google.com with ESMTPSA id pu5sm949784pac.21.2013.08.05.20.05.13 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 05 Aug 2013 20:05:14 -0700 (PDT) Message-ID: <1375758312.4457.69.camel@edumazet-glaptop> Subject: [PATCH] tcp: cubic: fix bug in bictcp_acked() From: Eric Dumazet To: David Miller Cc: Neal Cardwell , netdev , Van Jacobson , Yuchung Cheng Date: Mon, 05 Aug 2013 20:05:12 -0700 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet While investigating about strange increase of retransmit rates on hosts ~24 days after boot, Van found hystart was disabled if ca->epoch_start was 0, as following condition is true when tcp_time_stamp high order bit is set. (s32)(tcp_time_stamp - ca->epoch_start) < HZ Quoting Van : At initialization & after every loss ca->epoch_start is set to zero so I believe that the above line will turn off hystart as soon as the 2^31 bit is set in tcp_time_stamp & hystart will stay off for 24 days. I think we've observed that cubic's restart is too aggressive without hystart so this might account for the higher drop rate we observe. Diagnosed-by: Van Jacobson Signed-off-by: Eric Dumazet Cc: Neal Cardwell Cc: Yuchung Cheng Acked-by: Neal Cardwell --- net/ipv4/tcp_cubic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index a9077f4..2b8671d 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -414,7 +414,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us) return; /* Discard delay samples right after fast recovery */ - if ((s32)(tcp_time_stamp - ca->epoch_start) < HZ) + if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) < HZ) return; delay = (rtt_us << 3) / USEC_PER_MSEC;