netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: rcj@linux.vnet.ibm.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ibmveth: Increase default copybreak limits to 2k
Date: Sun, 24 Oct 2010 15:40:23 -0700 (PDT)	[thread overview]
Message-ID: <20101024.154023.70195854.davem@davemloft.net> (raw)
In-Reply-To: <20101021151746.GB5567@linux.vnet.ibm.com>

From: Robert Jennings <rcj@linux.vnet.ibm.com>
Date: Thu, 21 Oct 2010 10:17:46 -0500

> The value of copybreak is the point where we stop using the bounce
> buffer and start to copy data to new buffers; having the overhead of
> additional TCE entry setup/teardown.  For the default MTU of 1500,
> increasing the copybreak value to 2k will result in all packets using
> the bounce buffer now.  Expanding the use of the bounce buffer up to 2k
> with the default MTU resulted in ~10% throughput improvement.

On the RX side the copybreak serves another purpose.

First of all, when you RX a < ~128 byte frame, you incur the cost
mostly of the cache miss to touch the packet headers.  The extra
allocated SKB and the copy are close to free.

But more importantly, if you always pass the RX descriptor SKB
into the network stack, even for tiny frames, the skb->truesize
(which is what gets charged to the socket) is larger than we
want it to be.

For a 128 byte frame, the socket gets charged the full MTU packet
size.  Because that is how much memory it is really using.

This is what the RX side copybreak is dealing with and you
therefore cannot remove it so trivially.

I am not applying this patch.

      reply	other threads:[~2010-10-24 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 14:37 [PATCH] ibmveth: Increase default copybreak limits to 2k Robert Jennings
2010-10-21 14:45 ` David Miller
2010-10-21 15:17   ` Robert Jennings
2010-10-24 22:40     ` David Miller [this message]

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=20101024.154023.70195854.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rcj@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).