Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbbHQTLS (ORCPT ); Mon, 17 Aug 2015 15:11:18 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:35644 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbbHQTLP (ORCPT ); Mon, 17 Aug 2015 15:11:15 -0400 Date: Mon, 17 Aug 2015 12:11:14 -0700 (PDT) Message-Id: <20150817.121114.1040758760525721568.davem@davemloft.net> To: calvinowens@fb.com Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, sorin@returnze.ro Subject: Re: [PATCH] Revert "net: limit tcp/udp rmem/wmem to SOCK_{RCV,SND}BUF_MIN" From: David Miller In-Reply-To: <20150813212134.GA3070917@mail.thefacebook.com> References: <20150810.204630.1903301700926701432.davem@davemloft.net> <20150812045420.GA3908557@mail.thefacebook.com> <20150813212134.GA3070917@mail.thefacebook.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 17 Aug 2015 12:11:15 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2005 Lines: 42 From: Calvin Owens Date: Thu, 13 Aug 2015 14:21:34 -0700 > Commit 8133534c760d4083 ("net: limit tcp/udp rmem/wmem to > SOCK_{RCV,SND}BUF_MIN") modified four sysctls to enforce that the values > written to them are not less than SOCK_MIN_{RCV,SND}BUF. > > That change causes 4096 to no longer be accepted as a valid value for > 'min' in tcp_wmem and udp_wmem_min. 4096 has been the default for both > of those sysctls for a long time, and unfortunately seems to be an > extremely popular setting. This change breaks a large number of sysctl > configurations at Facebook. > > That commit referred to b1cb59cf2efe7971 ("net: sysctl_net_core: check > SNDBUF and RCVBUF for min length"), which choose to use the SOCK_MIN > constants as the lower limits to avoid nasty bugs. But AFAICS, a limit > of SOCK_MIN_SNDBUF isn't necessary to do that: the BUG_ON cited in the > commit message seems to have happened because unix_stream_sendmsg() > expects a minimum of a full page (ie SK_MEM_QUANTUM) and the math broke, > not because it had less than SOCK_MIN_SNDBUF allocated. > > This particular issue doesn't seem to affect TCP however: using a > setting of "1 1 1" for tcp_{r,w}mem works, although it's obviously > suboptimal. SK_MEM_QUANTUM would be a nice minimum, but it's 64K on > some archs, so there would still be breakage. > > Since a value of one doesn't seem to cause any problems, we can drop the > minimum 8133534c added to fix this. > > This reverts commit 8133534c760d4083f79d2cde42c636ccc0b2792e. > > Fixes: 8133534c760d4083 ("net: limit tcp/udp rmem/wmem to SOCK_MIN...") > Cc: Eric Dumazet > Cc: Sorin Dumitru > Signed-off-by: Calvin Owens Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/