From: Eric Dumazet <eric.dumazet@gmail.com>
To: mbizon@freebox.fr
Cc: David Madore <david+ml@madore.org>,
Francois Romieu <romieu@fr.zoreil.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Hugh Dickins <hughd@google.com>
Subject: Re: kernel 3.2.27 on arm: WARNING: at mm/page_alloc.c:2109 __alloc_pages_nodemask+0x1d4/0x68c()
Date: Thu, 04 Oct 2012 18:29:31 +0200 [thread overview]
Message-ID: <1349368171.16011.79.camel@edumazet-glaptop> (raw)
In-Reply-To: <1349366521.2532.12.camel@sakura.staff.proxad.net>
On Thu, 2012-10-04 at 18:02 +0200, Maxime Bizon wrote:
> On Fri, 2012-08-31 at 19:21 -0700, Hugh Dickins wrote:
>
> Hi,
>
> > Francois is right that a GFP_ATOMIC allocation from pskb_expand_head()
> > is failing, which can easily happen, and cause your "failed to reallocate
> > TX buffer" errors; but it's well worth looking up what's actually on
> > lines 2108 and 2109 of mm/page_alloc.c in 3.2.27:
> >
> > if (order >= MAX_ORDER) {
> > WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
> >
> > That was probably not a sane allocation request, it has gone out of range:
> > maybe the skb header is even corrupted. If you're lucky, it might be
> > something that netdev will recognize as already fixed.
>
> I have the same problem on the exact same hardware and found the cause:
>
> Author: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Tue Apr 10 20:08:39 2012 +0000
>
> net: allow pskb_expand_head() to get maximum tailroom
>
> [ Upstream commit 87151b8689d890dfb495081f7be9b9e257f7a2df ]
>
>
> It turns out this change has a bad side effect on drivers that uses
> skb_recycle(), in that case mv643xx_eth.c
>
> Since skb_recycle() resets skb->data using (skb->head + NET_SKB_PAD), a
> recycled skb going multiple times through a path that needs to expand
> skb head will get bigger and bigger each time, and you eventually end up
> with an allocation failure.
>
> An idea to fix this would be to pass needed skb size to skb_resize() and
> set skb->data to MIN(NET_SKB_PAD, (skb->end - skb->head - skb_size) / 2)
>
> skb recycling gives a small speed boost, but does not get a lot of test
> coverage since only 3 drivers uses it
>
Thanks Maxime
Sure we can probably fix this issue, but its really not worth the pain.
I would get rid of it, its superseded by build_skb() to get cache hot
skbs anyway, and more over, rx path now uses skb->head allocated from a
page fragment for optimal GRO/TCP coalescing behavior.
skb_recycle() assumes skb allocation is slow, but its not per se.
Cache line misses are expensive, thats the real issue.
next prev parent reply other threads:[~2012-10-04 16:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120829002548.GA7063@aldebaran.gro-tsen.net>
2012-09-01 2:21 ` kernel 3.2.27 on arm: WARNING: at mm/page_alloc.c:2109 __alloc_pages_nodemask+0x1d4/0x68c() Hugh Dickins
2012-09-01 8:20 ` Francois Romieu
2012-09-02 22:51 ` David Madore
2012-10-04 16:02 ` Maxime Bizon
2012-10-04 16:29 ` Eric Dumazet [this message]
2012-10-05 7:41 ` Eric Dumazet
2012-10-05 10:49 ` Maxime Bizon
2012-10-05 12:22 ` Eric Dumazet
2012-10-05 12:37 ` Eric Dumazet
2012-10-05 12:39 ` Eric Dumazet
2012-10-05 12:51 ` Maxime Bizon
2012-10-05 13:02 ` Eric Dumazet
2012-10-05 14:50 ` Maxime Bizon
2012-10-05 15:04 ` Eric Dumazet
2012-10-05 15:15 ` Maxime Bizon
2012-10-05 15:37 ` Eric Dumazet
2012-10-05 16:23 ` [PATCH] net: remove skb recycling Eric Dumazet
2012-10-07 4:41 ` David Miller
2012-10-04 16:50 ` kernel 3.2.27 on arm: WARNING: at mm/page_alloc.c:2109 __alloc_pages_nodemask+0x1d4/0x68c() Eric Dumazet
2012-10-04 17:09 ` Maxime Bizon
2012-10-04 17:17 ` Eric Dumazet
2012-10-04 17:34 ` Maxime Bizon
2012-10-04 21:27 ` Eric Dumazet
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=1349368171.16011.79.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=david+ml@madore.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbizon@freebox.fr \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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