]> git.baikalelectronics.ru Git - kernel.git/commit
flowcache: Increase threshold for refusing new allocations
authorMiroslav Urbanek <mu@miroslavurbanek.com>
Mon, 21 Nov 2016 14:48:21 +0000 (15:48 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 23 Nov 2016 05:37:09 +0000 (06:37 +0100)
commit578e1c42045d3fcd82aec5823e1d96f62d649b2d
treeab9132564a33ee87fb6fc5f810b70531e9445ab5
parentebd524d05c3dbd641eba728c4a8f2924c00fb612
flowcache: Increase threshold for refusing new allocations

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: 4e88b1805a78 ("flowcache: Avoid OOM condition under preasure")
Reported-by: Lukáš Koldrt <lk@excello.cz>
Tested-by: Jan Hejl <jh@excello.cz>
Signed-off-by: Miroslav Urbanek <mu@miroslavurbanek.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/core/flow.c