virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 1/6] net: allow > 0 order atomic page alloc in skb_page_frag_refill
@ 2014-01-16 19:52 Michael Dalton
  2014-01-16 19:52 ` [PATCH net-next v4 2/6] virtio-net: use per-receive queue page frag alloc for mergeable bufs Michael Dalton
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Michael Dalton @ 2014-01-16 19:52 UTC (permalink / raw)
  To: David S. Miller
  Cc: Michael Dalton, Michael S. Tsirkin, netdev, virtualization,
	Eric Dumazet, Ben Hutchings

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>
---
 net/core/sock.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 85ad6f0..b3f7ee3 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1836,9 +1836,7 @@ bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t prio)
 		put_page(pfrag->page);
 	}
 
-	/* We restrict high order allocations to users that can afford to wait */
-	order = (prio & __GFP_WAIT) ? SKB_FRAG_PAGE_ORDER : 0;
-
+	order = SKB_FRAG_PAGE_ORDER;
 	do {
 		gfp_t gfp = prio;
 
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-01-17  0:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 19:52 [PATCH net-next v4 1/6] net: allow > 0 order atomic page alloc in skb_page_frag_refill Michael Dalton
2014-01-16 19:52 ` [PATCH net-next v4 2/6] virtio-net: use per-receive queue page frag alloc for mergeable bufs Michael Dalton
2014-01-16 20:24   ` Michael S. Tsirkin
2014-01-16 19:52 ` [PATCH net-next v4 3/6] virtio-net: auto-tune mergeable rx buffer size for improved performance Michael Dalton
2014-01-16 19:52 ` [PATCH net-next v4 4/6] net-sysfs: add support for device-specific rx queue sysfs attributes Michael Dalton
2014-01-16 20:25   ` Michael S. Tsirkin
2014-01-16 19:52 ` [PATCH net-next v4 5/6] lib: Ensure EWMA does not store wrong intermediate values Michael Dalton
2014-01-16 20:08   ` Eric Dumazet
2014-01-16 20:25   ` Michael S. Tsirkin
2014-01-16 19:52 ` [PATCH net-next v4 6/6] virtio-net: initial rx sysfs support, export mergeable rx buffer size Michael Dalton
     [not found] ` <1389901950-3854-3-git-send-email-mwdalton@google.com>
2014-01-16 20:24   ` [PATCH net-next v4 3/6] virtio-net: auto-tune mergeable rx buffer size for improved performance Michael S. Tsirkin
     [not found] ` <1389901950-3854-6-git-send-email-mwdalton@google.com>
2014-01-16 20:25   ` [PATCH net-next v4 6/6] virtio-net: initial rx sysfs support, export mergeable rx buffer size Michael S. Tsirkin
2014-01-16 23:28 ` [PATCH net-next v4 1/6] net: allow > 0 order atomic page alloc in skb_page_frag_refill David Miller
2014-01-16 23:30   ` David Miller
     [not found]   ` <20140116.153020.587523865163482894.davem@davemloft.net>
2014-01-17  0:30     ` Michael Dalton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).