[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Adjust truesize in netfront to more closely reflect real data payload
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |