]> git.baikalelectronics.ru Git - kernel.git/commit
net: allow > 0 order atomic page alloc in skb_page_frag_refill
authorMichael Dalton <mwdalton@google.com>
Fri, 17 Jan 2014 06:23:25 +0000 (22:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jan 2014 07:46:06 +0000 (23:46 -0800)
commit6d70fd302aee721606911e21212bd798403b9007
tree4508da9976ccd11c0ed9f7805c7a86eea624a680
parentb8c6b2194bfd27b65788948e484557ce8c1f37ab
net: allow > 0 order atomic page alloc in skb_page_frag_refill

skb_page_frag_refill currently permits only order-0 page allocs
unless GFP_WAIT is used. Change skb_page_frag_refill to attempt
higher-order page allocations whether or not GFP_WAIT is used. If
memory cannot be allocated, the allocator will fall back to
successively smaller page allocs (down to order-0 page allocs).

This change brings skb_page_frag_refill in line with the existing
page allocation strategy employed by netdev_alloc_frag, which attempts
higher-order page allocations whether or not GFP_WAIT is set, falling
back to successively lower-order page allocations on failure. Part
of migration of virtio-net to per-receive queue page frag allocators.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Michael Dalton <mwdalton@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c