WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Adjust truesize in netfront to more close

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Adjust truesize in netfront to more closely reflect real data payload
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Aug 2006 15:30:28 +0000
Delivery-date: Tue, 15 Aug 2006 08:35:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User ack@xxxxxxxxxxxxxxxxxxxxx
# Node ID d48842f924d0e0c8e6e52887914850f4c7c02585
# Parent  b53b154a5126f55cccee374c71d33145cb1ef600
Adjust truesize in netfront to more closely reflect real data payload
plus supervisor overheads but keeping out gross hypervisor overheads.
Signed-off-by: Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |   23 ++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletion(-)

diff -r b53b154a5126 -r d48842f924d0 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Aug 15 
10:06:13 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Aug 15 
11:13:04 2006 +0100
@@ -1199,7 +1199,28 @@ err:
                }
 
                i = xennet_fill_frags(np, skb, &tmpq);
-               skb->truesize += skb->data_len;
+
+        /*
+         * Truesize must approximates the size of true data plus
+         * any supervisor overheads. Adding hypervisor overheads
+         * has been shown to significantly reduce achievable
+         * bandwidth with the default receive buffer size. It is
+         * therefore not wise to account for it here.
+         *
+         * After alloc_skb(RX_COPY_THRESHOLD), truesize is set to
+         * RX_COPY_THRESHOLD + the supervisor overheads. Here, we
+         * add the size of the data pulled in xennet_fill_frags().
+         *
+         * We also adjust for any unused space in the main data
+         * area by subtracting (RX_COPY_THRESHOLD - len). This is
+         * especially important with drivers which split incoming
+         * packets into header and data, using only 66 bytes of
+         * the main data area (see the e1000 driver for example.)
+         * On such systems, without this last adjustement, our
+         * achievable receive throughout using the standard receive
+         * buffer size was cut by 25%(!!!).
+         */
+               skb->truesize += skb->data_len - (RX_COPY_THRESHOLD - len);
                skb->len += skb->data_len;
 
                /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Adjust truesize in netfront to more closely reflect real data payload, Xen patchbot-unstable <=