From: Eric Dumazet <eric.dumazet@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Neal Cardwell <ncardwell@google.com>,
"David S. Miller" <davem@davemloft.net>,
John W Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Regression associated with commit c8628155ece3 - "tcp: reduce out_of_order memory use"
Date: Wed, 22 Aug 2012 07:15:03 +0200 [thread overview]
Message-ID: <1345612503.5158.566.camel@edumazet-glaptop> (raw)
In-Reply-To: <50345B12.1050600@lwfinger.net>
On Tue, 2012-08-21 at 23:07 -0500, Larry Finger wrote:
> Hi,
>
> The commit entitled "tcp: reduce out_of_order memory use" turns out to cause
> problems with a number of USB drivers.
>
> The first one called to my attention was for staging/r8712u. For this driver,
> there are problems with SSL communications as reported in
> https://bugzilla.redhat.com/show_bug.cgi?id=847525.
>
> Other drivers including rtl8187, rtl8192cu and rt2800usb cannot connect to a
> WPA1- or WEP-encrypted AP, but work fine with WPA2. The rtl8192cu problem is
> reported in https://bugzilla.kernel.org/show_bug.cgi?id=46171.
>
> I find it hard to understand why this patch should cause these effects; however,
> I have verified that a kernel generated from "git checkout e86b2919" works fine.
> This commit is immediately before the patch in question.
>
> Note, this patch was applied during the merge between 3.3 and 3.4. The
> regression has been undiscovered for some time.
>
> Any help on this problem will be appreciated.
>
> Larry
This particular commit is the start of a patches batch that ended in the
generic TCP coalescing mechanism.
It is known to have problem on drivers doing skb_clone() in their rx
path.
Current kernels should be ok, because coalescing doesnt happen if the
destination skb is cloned (skb_cloned(to) in skb_try_coalesce())
For 3.4 kernel, I guess I need to backport this skb_cloned(to) check fo
stable 3.4 kernel
But these skb_clone() in various USB drivers should be killed for good,
they really can kill the box because of skb->truesize lies.
Please test following patch (for 3.4 kernels)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 257b617..c45ac2d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4496,7 +4496,9 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
* to avoid future tcp_collapse_ofo_queue(),
* probably the most expensive function in tcp stack.
*/
- if (skb->len <= skb_tailroom(skb1) && !tcp_hdr(skb)->fin) {
+ if (skb->len <= skb_tailroom(skb1) &&
+ !skb_cloned(skb1) &&
+ !tcp_hdr(skb)->fin) {
NET_INC_STATS_BH(sock_net(sk),
LINUX_MIB_TCPRCVCOALESCE);
BUG_ON(skb_copy_bits(skb, 0,
next prev parent reply other threads:[~2012-08-22 5:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 4:07 Larry Finger
2012-08-22 4:26 ` David Miller
2012-08-22 5:15 ` Eric Dumazet [this message]
2012-08-22 16:00 ` Larry Finger
2012-08-22 21:33 ` Larry Finger
2012-08-23 4:03 ` Eric Dumazet
2012-08-23 20:57 ` Larry Finger
2012-08-23 21:26 ` Eric Dumazet
2012-08-24 14:09 ` Larry Finger
2012-08-24 14:55 ` Eric Dumazet
2012-08-24 15:49 ` Larry Finger
2012-08-24 16:01 ` Eric Dumazet
2012-08-24 16:29 ` Larry Finger
2012-08-24 15:19 ` David Miller
2012-08-24 15:58 ` Larry Finger
2012-08-24 16:18 ` Eric Dumazet
2012-08-24 16:23 ` Eric Dumazet
2012-08-24 16:58 ` Larry Finger
2012-08-24 17:47 ` Eric Dumazet
2012-08-27 17:55 ` Larry Finger
2012-08-27 18:21 ` Eric Dumazet
2012-08-27 20:39 ` Larry Finger
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=1345612503.5158.566.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ncardwell@google.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
all inboxes | Powered by JetHome®