From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbbJZVwk (ORCPT ); Mon, 26 Oct 2015 17:52:40 -0400 Received: from mail-forward4.uio.no ([129.240.10.33]:42702 "EHLO mail-forward4.uio.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998AbbJZVwj convert rfc822-to-8bit (ORCPT ); Mon, 26 Oct 2015 17:52:39 -0400 X-Greylist: delayed 948 seconds by postgrey-1.27 at vger.kernel.org; Mon, 26 Oct 2015 17:52:39 EDT Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: [PATCH RFC net-next 2/2] tcp: Add Redundant Data Bundling (RDB) From: Andreas Petlund In-Reply-To: Date: Mon, 26 Oct 2015 22:35:03 +0100 Cc: =?utf-8?Q?Bendik_R=C3=B8nning_Opstad?= , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Jonathan Corbet , Eric Dumazet , Tom Herbert , Yuchung Cheng , Paolo Abeni , Erik Kline , Hannes Frederic Sowa , Al Viro , Jiri Pirko , Alexander Duyck , Florian Westphal , Daniel Lee , Marcelo Ricardo Leitner , Daniel Borkmann , Willem de Bruijn , =?utf-8?Q?Linus_L=C3=BCssing?= , linux-doc@vger.kernel.org, LKML , Netdev , linux-api@vger.kernel.org, Andreas Petlund , Carsten Griwodz , =?utf-8?Q?P=C3=A5l_Halvorsen?= , Jonas Markussen , Kristian Evensen , Kenneth Klette Jonassen , =?utf-8?Q?Bendik_R=C3=B8nning_Opstad?= Content-Transfer-Encoding: 8BIT Message-Id: References: <1445633413-3532-1-git-send-email-bro.devel+kernel@gmail.com> <1445633413-3532-3-git-send-email-bro.devel+kernel@gmail.com> To: Neal Cardwell X-Mailer: Apple Mail (2.3094) X-UiO-SPF-Received: Received-SPF: softfail (mail-mx4.uio.no: transitioning domain of simula.no does not designate 84.208.79.228 as permitted sender) client-ip=84.208.79.228; envelope-from=apetlund@simula.no; helo=[192.168.74.106]; X-UiO-Ratelimit-Test: rcpts/h 34 msgs/h 1 sum rcpts/h 35 sum msgs/h 2 total rcpts 12369 max rcpts/h 34 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: D09550913BC0DF4DC1DD36C1BF7FB7780D336FAA X-UiO-SPAM-Test: UIO-GREYLIST remote_host: 84.208.79.228 spam_score: -49 maxlevel 80 minaction 1 bait 0 mail/h: 1 total 588 max/h 8 blacklist 0 greylist 1 ratelimit 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 26 Oct 2015, at 15:50, Neal Cardwell wrote: > > On Fri, Oct 23, 2015 at 4:50 PM, Bendik Rønning Opstad > wrote: >> @@ -2409,6 +2412,15 @@ static int do_tcp_setsockopt(struct sock *sk, int level, > ... >> + case TCP_RDB: >> + if (val < 0 || val > 1) { >> + err = -EINVAL; >> + } else { >> + tp->rdb = val; >> + tp->nonagle = val; > > The semantics of the tp->nonagle bits are already a bit complex. My > sense is that having a setsockopt of TCP_RDB transparently modify the > nagle behavior is going to add more extra complexity and unanticipated > behavior than is warranted given the slight possible gain in > convenience to the app writer. What about a model where the > application user just needs to remember to call > setsockopt(TCP_NODELAY) if they want the TCP_RDB behavior to be > sensible? I see your nice tests at > > https://github.com/bendikro/packetdrill/commit/9916b6c53e33dd04329d29b7d8baf703b2c2ac1b > > are already doing that. And my sense is that likewise most > well-engineered "thin stream" apps will already be using > setsockopt(TCP_NODELAY). Is that workable? We have been discussing this a bit back and forth. Your suggestion would be the right thing to keep the nagle semantics less complex and to educate developers in the intrinsics of the transport. We ended up choosing to implicitly disable nagle since it 1) is incompatible with the logic of RDB. 2) leaving it up to the developer to read the documentation and register the line saying that "failing to set TCP_NODELAY will void the RDB latency gain" will increase the chance of misconfigurations leading to deployment with no effect. The hope was to help both the well-engineered thin-stream apps and the ones deployed by developers with less detailed knowledge of the transport. -Andreas