The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Larry Woodman <lwoodman@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: __alloc_pages() failures reported due to fragmentation
Date: Fri, 03 Nov 2006 07:13:54 -0500	[thread overview]
Message-ID: <454B3282.3010308@redhat.com> (raw)

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() ?

-------------------------------------------------------------------
struct sk_buff *sock_alloc_send_pskb()
{
       unsigned int gfp_mask;
... 
                                                                          
       gfp_mask = sk->sk_allocation;
       if (gfp_mask & __GFP_WAIT)
               gfp_mask |= __GFP_REPEAT;
...
       skb = alloc_skb(header_len, sk->sk_allocation);
--------------------------------------------------------------------


--- linux-2.6.18.noarch/net/core/sock.c.orig
+++ linux-2.6.18.noarch/net/core/sock.c
@@ -1154,7 +1154,7 @@ static struct sk_buff *sock_alloc_send_p
 			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;




             reply	other threads:[~2006-11-03 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03 12:13 Larry Woodman [this message]
2006-11-03 12:21 ` __alloc_pages() failures reported due to fragmentation Arjan van de Ven
2006-11-03 12:39   ` Larry Woodman
2006-11-03 13:04     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=454B3282.3010308@redhat.com \
    --to=lwoodman@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox