[NET]: __alloc_pages() failures reported due to fragmentation
authorLarry Woodman <lwoodman@redhat.com>
Sat, 4 Nov 2006 00:05:45 +0000 (16:05 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 5 Nov 2006 22:11:32 +0000 (14:11 -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>
net/core/sock.c

index d472db4776c3bd72fcf396287ad7edf873affffb..ee6cd2541d35765642bcc10cb72ff52f5f2d97b7 100644 (file)
@@ -1160,7 +1160,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;