Browse Source

[NET]: __alloc_pages() failures reported due to fragmentation

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>
Larry Woodman 18 years ago
parent
commit
db38c179a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/core/sock.c

+ 1 - 1
net/core/sock.c

@@ -1160,7 +1160,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk,
 			goto failure;
 			goto failure;
 
 
 		if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) {
 		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) {
 			if (skb) {
 				int npages;
 				int npages;
 				int i;
 				int i;