From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ey0-f171.google.com (mail-ey0-f171.google.com [209.85.215.171]) (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 8E2A82008E8 for ; Tue, 10 Jul 2012 11:32:06 -0700 (PDT) Received: by eaaa12 with SMTP id a12so214816eaa.16 for ; Tue, 10 Jul 2012 11:32:04 -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=AqULWMO7ydqxbc2z4MImy+9f++A7YBDVLgs5YYMENwM=; b=Vd+/OEzB20awkARKzU5oHI3dUY2/qH6QP3avv8XktnHVisvVtj8zfsugzrkHulSaBN 2vKaTPZ63QIMsAkcJ/ww2C1fpR7/xV/XsfRCoalliGtsR0xzu0or3PWzhf6aLZXlewTq N/6BBqvc/3lnBjUeZZyvxeK9oI1cgthkPX3OZ0lDq2PEszx1WB8cplOHquxu0eOO+BzE 1f2TcOECxxumVW7bqywP0ThAKROcjCYLkvxVQizzB26Mntd9TEEbejImOxTm+aP8YzSp bXhCrgTnIT0n/JcbUAmEVOL7ur92DY2gDnIOdCbRKaNRi2yrZ1JtY0QWYs1iGphrMAsp 6eww== Received: by 10.14.27.137 with SMTP id e9mr10280189eea.105.1341945124583; Tue, 10 Jul 2012 11:32:04 -0700 (PDT) Received: from [172.28.88.40] ([74.125.122.49]) by mx.google.com with ESMTPS id a16sm104762225eeg.0.2012.07.10.11.32.02 (version=SSLv3 cipher=OTHER); Tue, 10 Jul 2012 11:32:03 -0700 (PDT) From: Eric Dumazet To: Yuchung Cheng In-Reply-To: References: <1340945457.29822.7.camel@edumazet-glaptop> <1341396687.2583.1757.camel@edumazet-glaptop> <20120709.000834.1182150057463599677.davem@davemloft.net> <1341845722.3265.3065.camel@edumazet-glaptop> <1341933215.3265.5476.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" Date: Tue, 10 Jul 2012 20:32:00 +0200 Message-ID: <1341945120.3265.6030.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: nanditad@google.com, netdev@vger.kernel.org, codel@lists.bufferbloat.net, mattmathis@google.com, ncardwell@google.com, David Miller Subject: Re: [Codel] [RFC PATCH v2] tcp: TCP Small Queues 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: Tue, 10 Jul 2012 18:32:07 -0000 On Tue, 2012-07-10 at 10:37 -0700, Yuchung Cheng wrote: > On Tue, Jul 10, 2012 at 8:13 AM, Eric Dumazet wrote: > > + > > + if (!sock_owned_by_user(sk)) { > > + if ((1 << sk->sk_state) & > > + (TCPF_CLOSE_WAIT | TCPF_ESTABLISHED)) > > + tcp_write_xmit(sk, > > + tcp_current_mss(sk), > > + 0, 0, > > + GFP_ATOMIC); > Is this case possible: app does a large send and immediately closes > the socket. then > the queue is throttled and tcp_write_xmit is called back when state is > in TCP_FIN_WAIT1. > > I think tcp_write_xmit should continue regardless of the current state > because the > send maybe throttled/delayed but state change is synchronous. > I need testing some allowed states, I think. Maybe I missed some states, but I dont think we should call tcp_write_xmit() if socket is now in TIMEWAIT state ? (because of tasklet delay, we might handle TX completion _after_ socket state change)