Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752717AbbHJFlU (ORCPT ); Mon, 10 Aug 2015 01:41:20 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:39513 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752201AbbHJFlR (ORCPT ); Mon, 10 Aug 2015 01:41:17 -0400 Date: Sun, 09 Aug 2015 22:41:14 -0700 (PDT) Message-Id: <20150809.224114.818332231954008575.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] net: Unbreak resetting default values for tcp_wmem/udp_wmem_min From: David Miller In-Reply-To: <1438806414-751067-1-git-send-email-calvinowens@fb.com> References: <1438806414-751067-1-git-send-email-calvinowens@fb.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]); Sun, 09 Aug 2015 22:41:17 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1459 Lines: 32 From: Calvin Owens Date: Wed, 5 Aug 2015 13:26:54 -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. > > This change is fine for tcp_rmem and udp_rmem_min, since SOCK_MIN_RCVBUF > is equal to equal to TCP_SKB_MIN_TRUESIZE. But it breaks tcp_wmem and > udp_wmem_min for previously valid values because SOCK_MIN_SNDBUF is > (2 * TCP_SKB_MIN_TRUESIZE), which ends up being greater than 4KB. > > Thus, 4096 is no longer accepted as a valid value, despite still being > the default for udp_wmem_min, and for 'min' in tcp_wmem. A huge number > of sysctl configurations at FB use 4096 as 'min', so this change breaks > all of them. > > This patch changes the sysctls to simply enforce that the value written > is greater than or equal to the default value of SK_MEM_QUANTUM. > > Fixes: 8133534c760d4083 ("net: limit tcp/udp rmem/wmem to SOCK_MIN...") > Signed-off-by: Calvin Owens I think increasing the default makes more sense. If we don't allow applications to set 4K, the kernel shouldn't start with that value either. -- 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/