From: Larry Woodman Date: Thu, 9 Nov 2006 10:05:38 +0000 (+0100) Subject: [NET]: __alloc_pages() failures reported due to fragmentation X-Git-Tag: v2.6.16.32-rc1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4504530e9f7310af00f79807029659c32fda90a1;p=thirdparty%2Fkernel%2Fstable.git [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 Signed-off-by: David S. Miller Signed-off-by: Adrian Bunk --- diff --git a/net/core/sock.c b/net/core/sock.c index 5621198f18ec0..1eeed40162f2a 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -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;