From: Michael Dalton <mwdalton@google.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Michael Dalton <mwdalton@google.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Eric Dumazet <edumazet@google.com>,
Ben Hutchings <bhutchings@solarflare.com>
Subject: [PATCH net-next v5 1/6] net: allow > 0 order atomic page alloc in skb_page_frag_refill
Date: Thu, 16 Jan 2014 18:36:11 -0800 [thread overview]
Message-ID: <1389926176-6699-2-git-send-email-mwdalton@google.com> (raw)
In-Reply-To: <1389926176-6699-1-git-send-email-mwdalton@google.com>
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
next prev parent reply other threads:[~2014-01-17 2:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 2:36 [PATCH net-next v5 0/6] virtio-net: mergeable rx buffer size auto-tuning Michael Dalton
2014-01-17 2:36 ` Michael Dalton [this message]
2014-01-17 2:36 ` [PATCH net-next v5 2/6] virtio-net: use per-receive queue page frag alloc for mergeable bufs Michael Dalton
2014-01-17 2:36 ` [PATCH net-next v5 3/6] virtio-net: auto-tune mergeable rx buffer size for improved performance Michael Dalton
2014-01-17 2:36 ` [PATCH net-next v5 4/6] net-sysfs: add support for device-specific rx queue sysfs attributes Michael Dalton
2014-01-17 2:36 ` [PATCH net-next v5 5/6] lib: Ensure EWMA does not store wrong intermediate values Michael Dalton
2014-01-17 2:36 ` [PATCH net-next v5 6/6] virtio-net: initial rx sysfs support, export mergeable rx buffer size Michael Dalton
2014-01-17 3:08 ` [PATCH net-next v5 0/6] virtio-net: mergeable rx buffer size auto-tuning David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389926176-6699-2-git-send-email-mwdalton@google.com \
--to=mwdalton@google.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox