Subject: Re: [PATCH] Disable TSO for non standard qdiscs

From: Patrick McHardy <[email-masked]>
Date: Fri, 01 Feb 2008 10:56:57 +0100

Waskiewicz Jr, Peter P wrote:
>> Indeed. As an example of an unknowing user, this discussion 
>> made me check whether my cablemodem device (on which I'm 
>> using HFSC) uses TSO :)
> 
> The TSO defer logic is based on your congestion window and current
> window size.  So the actual frame sizes hitting your NIC attached to
> your DSL probably aren't anywhere near 64KB, but probably more in line
> with whatever your window size is for DSL.
> 
> The bottom line is TSO saves CPU cycles.  If we want to make it go away
> because of a traffic shaping qdisc interfering, then that's fine.  I
> just don't think a TSO option should be added to the scheduler layer,
> since it already exists in the ethtool layer.  Asking a user to type
> 'ethtool -k <devicename> tso off' is probably going to be much easier
> than setting an option on your qdisc through tc to turn TSO back on.
> 
> I think we're having more of a disagreement of what is considered the
> "normal case" user.  If you are on a slow link, such as a DSL/cable
> line, your TCP window/congestion window aren't going to be big enough to
> generate large TSO's, so what is the issue?  But disabling TSO, say on a
> 10 GbE link, can cut throughput by half (I have data on 8-core machines
> with 10 GbE with/without TSO if you're interested).  Even on a
> single-core machine with a 1GbE link can have bad performance hits.  So
> this is why I'm so concerned about a proposal to turn off TSO outside of
> the current established methods of using ethtool.  Rather than educating
> the user about how to turn TSO back on using tc if they want it, educate
> them why they may want to consider turning TSO off in certain
> configurations.  And I don't consider any user effectively using a TBF
> qdisc someone incapable of understanding how to use ethtool.

We don't want to disable TSO for cases where it makes sense, but
who is using TBF on 10GbE? The point is that most users of qdiscs
which are incapable of dealing with TSO without hacks or special
configuration probably don't care, and 10GbE users know about
ethtool *and* don't use TBF or HTB (which are probably the only
qdiscs which actually have problems, maybe also CBQ).