]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
[PATCH] NET: __alloc_pages() failures reported due to fragmentation
authorDavid Miller <davem@davemloft.net>
Mon, 6 Nov 2006 23:07:16 +0000 (15:07 -0800)
committerChris Wright <chrisw@sous-sol.org>
Sun, 19 Nov 2006 03:28:02 +0000 (19:28 -0800)
We have seen a couple of __alloc_pages() failures due to
fragmentation, there is plenty of free memory but no large order pages
available.  I think the problem is in sock_alloc_send_pskb(), the
gfp_mask includes __GFP_REPEAT but its never used/passed to the page
allocator.  Shouldnt the gfp_mask be passed to alloc_skb() ?

Signed-off-by: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/core/sock.c

index 51fcfbc041a73d38f0172a77c1e5e48b1224f0b7..e7ecdf22f130bc45746b345fdd52d87d7d4ccc07 100644 (file)
@@ -1164,7 +1164,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk,
                        goto failure;
 
                if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) {
-                       skb = alloc_skb(header_len, sk->sk_allocation);
+                       skb = alloc_skb(header_len, gfp_mask);
                        if (skb) {
                                int npages;
                                int i;