From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id ED1CB2021A8 for ; Mon, 6 Aug 2012 09:46:24 -0700 (PDT) Received: by bkty15 with SMTP id y15so1883368bkt.16 for ; Mon, 06 Aug 2012 09:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=tWB1KgYoDdZoMvZRC2xL/21ZsfI0WNwTpjJRKYoq7J0=; b=FfbU/OOA/15zzvbh2DvgT/LLaPP7tIQ7X27DQ8Ryafen+4tw58Z08sxyUWt85kuux7 iwG1FeDWuutyp6ly0Bi9yX45VOSZgXfTVrMKWwITKE7j61upA5QZI+B6L7+Ght2nlKTO 2h0vFQk2P4lhBIrrfDJ37EWKgL5FMm8xxHB0JLZ7fO0UkrD2996pn0/frWP/hlfDrc3B 8lmaKsYngIeAqOgOi/9M+YQp0desSl/dKqfQJn3RvC/tvPmAKF/fETGsLVla9wRV2n84 H4OOXDgY3OQW0gQjmSojb/kWvuH0g7acdSHN6/cKQ3iUOasgrkQ9OWj2pRxxRQKl17u3 xiYg== Received: by 10.204.156.69 with SMTP id v5mr4328666bkw.97.1344271582657; Mon, 06 Aug 2012 09:46:22 -0700 (PDT) Received: from [172.28.91.36] ([74.125.122.49]) by mx.google.com with ESMTPS id hg13sm7736863bkc.7.2012.08.06.09.46.20 (version=SSLv3 cipher=OTHER); Mon, 06 Aug 2012 09:46:21 -0700 (PDT) From: Eric Dumazet To: Richard Scheffenegger In-Reply-To: <8860AEB6C5DB43649852D9A8B40E9B9F@srichardlxp2> References: <1344048299-26267-1-git-send-email-dave.taht@bufferbloat.net> <1344062738.9299.1453.camel@edumazet-glaptop> <501D99C4.20902@pollere.com> <7EB59257-1A8E-4567-8AD3-5016594565CC@gmail.com> <1344144623.9299.1557.camel@edumazet-glaptop> <4A256974B5054317913BC067C4E5FAE1@srichardlxp2> <1344187557.9299.1610.camel@edumazet-glaptop> <1344188112.9299.1614.camel@edumazet-glaptop> <1344192037.9299.1618.camel@edumazet-glaptop> <8860AEB6C5DB43649852D9A8B40E9B9F@srichardlxp2> Content-Type: text/plain; charset="UTF-8" Date: Mon, 06 Aug 2012 18:46:19 +0200 Message-ID: <1344271579.26674.45.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: codel@lists.bufferbloat.net Subject: Re: [Codel] [RFC PATCH] codel: ecn mark at target X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2012 16:46:25 -0000 On Mon, 2012-08-06 at 18:22 +0200, Richard Scheffenegger wrote: > Well, as long as the window is large enough, the delayed ACKs shouldn't > matter, even if the ECE is delayed for 1 segment; the argument about delayed > ACKs when cwnd is 1 is also true for non-ECN flows; they would run better > when every segment is acked individually; but can the receiver tell, if the > sender is running at cwnd=1? > It should just be safe instead than lazy. Frankly what's the deal to send an ACK right now instead of in 40ms ? > Perhaps, if it tracks the RTT of the flow (which has to work without TS, as > they are undefined for pure ACKs), and the number of segments seen during > one RTT... Linux does have an heuristic to _not_ use delayed acks for the first packets received (about 15 MSS), _because_ it assumes sender has a small cwnd. When receiving out of order packets, this logic is restarted, because we want to send SACKS as soon as possible, not after a delayed ack. Every time we suspect sender has a small cwnd, we enter the quickack mode. So when receiving CE segments, we should do the same. Thats a flaw in current linux code to do nothing and expect more packets to come. It just works because RTO triggers. A lot of bugs are hidden because of various timers that take some emergency actions. tcp_enter_quickack_mode() has all the needed tweaks. diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2fd2bc9..2e55337 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -237,6 +237,9 @@ static inline void TCP_ECN_check_ce(struct tcp_sock *tp, const struct sk_buff *s tcp_enter_quickack_mode((struct sock *)tp); break; case INET_ECN_CE: + /* Better not delay acks, sender can have a very low cwnd */ + tcp_enter_quickack_mode((struct sock *)tp); + tp->ecn_flags |= TCP_ECN_DEMAND_CWR; /* fallinto */ default: