From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>
Subject: Re: TCP transmit performance regression
Date: Mon, 09 Jul 2012 15:54:03 +0200 [thread overview]
Message-ID: <1341842043.3265.2914.camel@edumazet-glaptop> (raw)
In-Reply-To: <CACVXFVNYwNrdWS_EiQ4O0-ou369AQ2tB4qbvmzY1rt5T3QnyUw@mail.gmail.com>
On Mon, 2012-07-09 at 21:23 +0800, Ming Lei wrote:
> Looks the patch replaces skb_clone with netdev_alloc_skb_ip_align and
> introduces extra copies on incoming data, so would you mind explaining
> it in a bit detail? And why is skb_clone not OK for the purpose?
Problem with cloning is that some paths will have to make a private copy
of the skb.
So you dont see the cost here in the driver, but later in upper stacks.
Since this driver defaults to a huge RX area of more than 16Kbytes,
a copy to a much smaller skb (we call this 'copybreak' in our jargon )
is more than welcome to avoid OOM problems anyway.
TCP coalescing (skb_try_coalesce) for example wont work for cloned skbs,
so TCP receive window will close pretty fast, and performance sucks in
lossy environments (like the Internet)
Actually, since this driver lies about skb->truesize, a single UDP frame
consumes 32Kbytes of memory, escaping normal memory limits we have in
kernel by a factor of 64. Thats pretty bad, especially for a beagle
board.
next prev parent reply other threads:[~2012-07-09 13:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 1:45 TCP transmit performance regression Ming Lei
2012-07-05 7:43 ` Eric Dumazet
2012-07-05 8:27 ` Ming Lei
2012-07-05 8:33 ` Eric Dumazet
2012-07-05 8:42 ` Ming Lei
2012-07-05 9:49 ` Eric Dumazet
2012-07-05 10:02 ` David Miller
2012-07-05 10:32 ` Ming Lei
2012-07-05 10:41 ` Eric Dumazet
2012-07-05 14:01 ` Ming Lei
2012-07-05 14:28 ` Eric Dumazet
2012-07-05 14:56 ` Eric Dumazet
2012-07-06 0:45 ` Ming Lei
2012-07-06 4:58 ` Eric Dumazet
2012-07-06 5:16 ` Eric Dumazet
2012-07-09 5:13 ` Ming Lei
2012-07-09 13:23 ` Ming Lei
2012-07-09 13:54 ` Eric Dumazet [this message]
[not found] ` <CACVXFVNdiwVn1Mo--N4N0HdYrEJizExtd_cppT4tS=mjog2PKw@mail.gmail.com>
[not found] ` <1341895143.3265.4049.camel@edumazet-glaptop>
2012-07-10 7:22 ` Ming Lei
2012-07-10 8:28 ` Eric Dumazet
2012-07-10 13:37 ` Ming Lei
2012-07-10 14:02 ` Eric Dumazet
2012-07-10 14:22 ` Ming Lei
2012-07-10 14:45 ` 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=1341842043.3265.2914.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tom.leiming@gmail.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