net: do not deplete pfmemalloc reserve
authorEric Dumazet <edumazet@google.com>
Wed, 22 Apr 2015 14:33:36 +0000 (07:33 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 May 2015 11:07:58 +0000 (07:07 -0400)
commitcfe7befc7d598ad55d0010af03d0dc82ba808492
tree3c359536faba86faa8908e578a1bbce6749074c2
parentb5635e4539d82648f109c45d7ac09e4a7b3719a3
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: Sasha Levin <sasha.levin@oracle.com>
net/core/skbuff.c