Received: by 10.223.176.5 with SMTP id f5csp4005870wra; Tue, 30 Jan 2018 00:15:34 -0800 (PST) X-Google-Smtp-Source: AH8x225iLlisL1eIFhnQwUlGYLhZOkg4SQPmFODZ3ju28DeDNd1fBhhplVX9Fm4a7UYQfkdKX/03 X-Received: by 10.99.1.85 with SMTP id 82mr1609114pgb.136.1517300134488; Tue, 30 Jan 2018 00:15:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517300134; cv=none; d=google.com; s=arc-20160816; b=o798j5R9KCWdM6V32oEjFWIgtdfo/pWQx+6OY6LfNqZDCTRyhLW/ah9JLVJq/ZQU6y RJPP2hp1Vl/NsVAex9OxlBn16BbDZF7btyl7kL+cPGi2UXjOvbA4wuGqjJIOX11+x7iE l0tR39MAzUH0VEo1HNtq5a891KIhmg790ekXtoyiADDtY9FpD861CEVqBvqMEskeUHCi 59nD8/cAEml7cz13Q5NP5y/zimy0i9nDDr2vCmgEY8CjUOM7lrBkJ1KI+N1PR7HwV39U 1fzBeA08D7G3Rlnc9Lscn8LeGcB/dgynyxAYdrr7OBA0GhI8NAGW1Rn2ntJStnBzKtFC GPIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=bvRVTr58W1Cps0j58UobrUR+NVjcTdDPHhEamWXSwls=; b=Phv7MY9wufA63yNNEGbqdEMYG8wm9HmCKYwgSLvGgvOHfvO3y6+arx7fJyXGAT1EeO 6snpJmW2k3ovrk5sWrxe1PWzUBzv/+Lvuzk2awJ9Ap63USA2vN+PXYCuWXKUZL/FZRNe cDJxtbgfhqyCZ7ASuF48xheoglz752UM1//vI04SFLVT6LLOtL85Tj3GON24m/JOl/g0 cp7ATRrz6Ts+08PF2wRCY/SsaXR0R4BdLdp5qj0T4Lt6s6kfoQunz9sdPj1DUrH7nqVu Cf+LrCDV+OCpjTXtSQSZZKcljH/n1luqLNIOlOAoTtLE8TN3wCo692Z9soX8HuFXHx5f t7yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g23-v6si4322681plo.341.2018.01.30.00.15.20; Tue, 30 Jan 2018 00:15:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbeA3IOl convert rfc822-to-8bit (ORCPT + 99 others); Tue, 30 Jan 2018 03:14:41 -0500 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:40482 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751822AbeA3IOj (ORCPT ); Tue, 30 Jan 2018 03:14:39 -0500 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.84_2) (envelope-from ) id 1egR0p-0006Lz-Dc; Tue, 30 Jan 2018 09:11:27 +0100 Date: Tue, 30 Jan 2018 09:11:27 +0100 From: Florian Westphal To: Michal Hocko Cc: Florian Westphal , "Kirill A. Shutemov" , Tetsuo Handa , davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, aarcange@redhat.com, yang.s@alibaba-inc.com, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org, mingo@kernel.org, linux-mm@kvack.org, rientjes@google.com, akpm@linux-foundation.org, guro@fb.com, kirill.shutemov@linux.intel.com Subject: Re: [netfilter-core] kernel panic: Out of memory and no killable processes... (2) Message-ID: <20180130081127.GH5906@breakpoint.cc> References: <001a1144b0caee2e8c0563d9de0a@google.com> <201801290020.w0T0KK8V015938@www262.sakura.ne.jp> <20180129072357.GD5906@breakpoint.cc> <20180129082649.sysf57wlp7i7ltb2@node.shutemov.name> <20180129165722.GF5906@breakpoint.cc> <20180129182811.fze4vrb5zd5cojmr@node.shutemov.name> <20180129223522.GG5906@breakpoint.cc> <20180130075226.GL21609@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20180130075226.GL21609@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko wrote: > On Mon 29-01-18 23:35:22, Florian Westphal wrote: > > Kirill A. Shutemov wrote: > [...] > > > I hate what I'm saying, but I guess we need some tunable here. > > > Not sure what exactly. > > > > Would memcg help? > > That really depends. I would have to check whether vmalloc path obeys > __GFP_ACCOUNT (I suspect it does except for page tables allocations but > that shouldn't be a big deal). But then the other potential problem is > the life time of the xt_table_info (or other potentially large) data > structures. Are they bound to any process life time. No. > Because if they are > not then the OOM killer will not help. The OOM panic earlier in this > thread suggests it doesn't because the test case managed to eat all the > available memory and killed all the eligible tasks which didn't help. Yes, which is why we do not want any OOM killer invocation in first place... > So in some sense the memcg would help to stop the excessive allocation, > but it wouldn't resolve it other than kill all tasks in the affected > memcg/container. Whether this is sufficient or not, I dunno. It sounds > quite suboptimal to me. But it is true this would be less tricky then > adding a global knob... Global knob doesn't really help at all, I can add multiple large iptables rulesets (so we would have to account), and we have same issue in virtually all of networking, so we need limits for interface count, tunnel count, ipsec policies/SAs, nftables, tc, etc etc.