Thread (30 messages) 30 messages, 8 authors, 2013-02-26

Re: 3.2.8/amd64 full interrupt hangs and deadlocks under big network copies (page allocation failure)

From: Eric Dumazet <hidden>
Date: 2012-04-10 04:03:39
Also in: linux-wireless

Possibly related (same subject, not in this thread)

On Mon, 2012-04-09 at 15:34 -0400, David Miller wrote:
From: Eric Dumazet <redacted>
Date: Mon, 09 Apr 2012 21:11:12 +0200
quoted
I think Marc posted stack traces showing problem on transmit side.
 ...
quoted
I dont really understand how it can happen, with MTU=1500
Depending upon the configuration and the driver, wireless can need
more headroom.  For encryption an extra 8 bytes are necessary, and the
driver may request a variable amount of extra headroom via
->hw.extra_tx_headroom

What wireless device are we dealing with again?
Problem seems related to tailroom needed by mac80211
(IEEE80211_ENCRYPT_TAILROOM = 18 bytes)

So we must reallocate skb->head, thats impressive nobody cares.

[ 3007.249687] ieee80211_skb_resize(skb=ffff8802329846e8) cloned=1 head_need=0 tail_need=18 skb->len=1494 ksize=4096 tailroom=0 headroom=2282
[ 3007.249693] ieee80211_skb_resize(skb=ffff8802329846e8) cloned=0 head_need=0 tail_need=0 skb->len=1526 ksize=8192 tailroom=64 headroom=2250

Ouch... skb_tailroom() seems wrong ... it seems pskb_expand_head() is really suboptimal.

It appears tcp_sendmsg() tries to fill skb completely, with no available tailroom :

                        if (skb_tailroom(skb) > 0) {
                                /* We have some space in skb head. Superb! */
                                if (copy > skb_tailroom(skb))
                                        copy = skb_tailroom(skb);
                                err = skb_add_data_nocache(sk, skb, from, copy);
                                if (err)
                                        goto do_fault;
                        } else {


Shouldnt we take into account dev->needed_tailroom ?

I'll submit a pskb_expand_head() fix asap.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help