]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: do not deplete pfmemalloc reserve
authorEric Dumazet <edumazet@google.com>
Wed, 22 Apr 2015 14:33:36 +0000 (07:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:34 +0000 (22:03 +0200)
commite591662c1a5fb0e9ee486bf8edbed14d0507cfb4
tree72cf077c40f5872613022db86da8e248a72a90a0
parent7e72469760dd73a44e8cfd6105bf695b7572e246
net: do not deplete pfmemalloc reserve

[ Upstream commit 79930f5892e134c6da1254389577fffb8bd72c66 ]

build_skb() should look at the page pfmemalloc status.
If set, this means page allocator allocated this page in the
expectation it would help to free other pages. Networking
stack can do that only if skb->pfmemalloc is also set.

Also, we must refrain using high order pages from the pfmemalloc
reserve, so __page_frag_refill() must also use __GFP_NOMEMALLOC for
them. Under memory pressure, using order-0 pages is probably the best
strategy.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/skbuff.c