From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steffen Klassert Subject: Re: [PATCH] flowcache: Increase threshold for refusing new allocations Date: Wed, 23 Nov 2016 13:42:55 +0100 Message-ID: <20161123124255.GA3541@gauss.secunet.com> References: <20161121144820.GA4048@miroslavurbanek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Cc: NetDev To: Miroslav Urbanek Return-path: Received: from a.mx.secunet.com ([62.96.220.36]:57133 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936026AbcKWMnK (ORCPT ); Wed, 23 Nov 2016 07:43:10 -0500 Content-Disposition: inline In-Reply-To: <20161121144820.GA4048@miroslavurbanek.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Nov 21, 2016 at 03:48:21PM +0100, Miroslav Urbanek wrote: > The threshold for OOM protection is too small for systems with large > number of CPUs. Applications report ENOBUFs on connect() every 10 > minutes. > > The problem is that the variable net->xfrm.flow_cache_gc_count is a > global counter while the variable fc->high_watermark is a per-CPU > constant. Take the number of CPUs into account as well. > > Fixes: 6ad3122a08e3 ("flowcache: Avoid OOM condition under preasure") > Reported-by: Lukáš Koldrt > Tested-by: Jan Hejl > Signed-off-by: Miroslav Urbanek Applied to the ipsec tree, thanks!