[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20101024.154023.70195854.davem@davemloft.net>
Date: Sun, 24 Oct 2010 15:40:23 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: rcj@...ux.vnet.ibm.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ibmveth: Increase default copybreak limits to 2k
From: Robert Jennings <rcj@...ux.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists