mac80211: Adjust TSQ pacing shift
authorToke Høiland-Jørgensen <toke@toke.dk>
Fri, 2 Feb 2018 15:11:05 +0000 (16:11 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 23 Feb 2018 11:08:56 +0000 (12:08 +0100)
commit36148c2bbfbe50c50206b6f61d072203c80161e0
treeaa85fdf870c82db17fee593d0d0efbe4671f71dd
parent93c62c45ed5fad1b87e3a45835b251cd68de9c46
mac80211: Adjust TSQ pacing shift

Since we now have the convenient helper to do so, actually adjust the
TSQ pacing shift for packets going out over a WiFi interface. This
significantly improves throughput for locally-originated TCP
connections. The default pacing shift of 10 corresponds to ~1ms of
queued packet data. Adjusting this to a shift of 8 (i.e. ~4ms) improves
1-hop throughput for ath9k by a factor of 3, whereas increasing it more
has diminishing returns.

Achieved throughput for different values of sk_pacing_shift (average of
5 iterations of 10-sec netperf runs to a host on the other side of the
WiFi hop):

sk_pacing_shift 10:  43.21 Mbps (pre-patch)
sk_pacing_shift  9:  78.17 Mbps
sk_pacing_shift  8: 123.94 Mbps
sk_pacing_shift  7: 128.31 Mbps

Latency for competing flows increases from ~3 ms to ~10 ms with this
change. This is about the same magnitude of queueing latency induced by
flows that are not originated on the WiFi device itself (and so are not
limited by TSQ).

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c