net: fix sk_mem_reclaim_partial()
authorEric Dumazet <edumazet@google.com>
Fri, 15 May 2015 19:39:25 +0000 (12:39 -0700)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:03:52 +0000 (11:03 +0100)
commita5b79829a441e6240b56f589c0fb003876b30126
tree8f37ecae9f6f667344f43ef96b82c4691689b692
parent4c1307b232a55552e69cb1a367cc6f97a4991f62
net: fix sk_mem_reclaim_partial()

commit 1a24e04e4b50939daa3041682b38b82c896ca438 upstream.

sk_mem_reclaim_partial() goal is to ensure each socket has
one SK_MEM_QUANTUM forward allocation. This is needed both for
performance and better handling of memory pressure situations in
follow up patches.

SK_MEM_QUANTUM is currently a page, but might be reduced to 4096 bytes
as some arches have 64KB pages.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/net/sock.h
net/core/sock.c