Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752305AbdIIEfZ (ORCPT ); Sat, 9 Sep 2017 00:35:25 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34563 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbdIIEfX (ORCPT ); Sat, 9 Sep 2017 00:35:23 -0400 X-Google-Smtp-Source: ADKCNb7hftsT5mi/dN1onTsFhys1Sk4jySLI8A57m9f6JtRa7b++Z3HaMr0DNKt9sO15ipfYkhJP7TRuW4bxkLVVOMo= MIME-Version: 1.0 In-Reply-To: <798CA25A-CA09-4D06-A9B6-7C5791A6EEC1@cmss.chinamobile.com> References: <1504753808-13266-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <798CA25A-CA09-4D06-A9B6-7C5791A6EEC1@cmss.chinamobile.com> From: Cong Wang Date: Fri, 8 Sep 2017 21:35:02 -0700 Message-ID: Subject: Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob To: =?UTF-8?B?5Lil5rW35Y+M?= Cc: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Eric Dumazet , Linux Kernel Network Developers , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v894ZUPS011740 Content-Length: 918 Lines: 20 On Fri, Sep 8, 2017 at 6:25 PM, 严海双 wrote: > > >> On 2017年9月9日, at 上午6:13, Cong Wang wrote: >> >> On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan >> wrote: >>> Different namespace application might require different maximal number >>> of TCP sockets independently of the host. >> >> So after your patch we could have N * net->ipv4.sysctl_tcp_max_orphans >> in a whole system, right? This just makes OOM easier to trigger. >> > > From my understanding, before the patch, we had N * net->ipv4.sysctl_tcp_max_orphans, > and after the patch, we could have ns1.sysctl_tcp_max_orphans + ns2.sysctl_tcp_max_orphans > + ns3.sysctl_tcp_max_orphans, is that right? Thanks for your reviewing. Nope, by N I mean the number of containers. Before your patch, the limit is global, after your patch it is per container.