]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[NET]: __alloc_pages() failures reported due to fragmentation
authorLarry Woodman <lwoodman@redhat.com>
Thu, 9 Nov 2006 10:05:38 +0000 (11:05 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 9 Nov 2006 10:05:38 +0000 (11:05 +0100)
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: Adrian Bunk <bunk@stusta.de>
net/core/sock.c

index 5621198f18ec0133c387e4358dab80b3d0e869ff..1eeed40162f2a66d4578b851b5363253d5cbcdb9 100644 (file)
@@ -961,7 +961,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;