Re: [Bonding-devel][PATCH]Zero Copy Transmit Support (Update)
From: David S. Miller
Date: Thu Nov 11 2004 - 19:23:05 EST
On Fri, 12 Nov 2004 15:51:49 -0800 (PST)
Radheka Godse <radheka.godse@xxxxxxxxx> wrote:
> -
> +
> + /* We let the bond device publish all hardware
> + * acceleration features possible. This is OK,
> + * since if an skb is passed from the bond to
> + * a slave that doesn't support one of those
> + * features, everything is fixed in the
> + * dev_queue_xmit() function (e.g. calculate
> + * check sum, linearize the skb, etc.).
> + */
This is very inefficient if the bond slaves don't
support these features.
I believe you when you say you saw improvement in the
case where the slaves do support TSO, but if you test
a non-TSO slave case I bet you'll see a marked
decrease in system utilization at least.
The upper layers need to know the precise capabilities
of the device in order to optimize the copy from userspace,
the checksumming, and the data gathering into the SKB.
Therefore, if you "fake it out" like this without checking
what the slaves actually support, then a lot of wasted cpu
time will be spent in each dev_queue_xmit() path. There will
in many cases be multiple passes over the data instead of one,
and it is possible to introduce an extra data copy as well.
I would recommend instead the following algorithm. Publish
only the capabilities which all slaves support.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/