mac80211: Change default tx_sk_pacing_shift to 7 [Linux 5.0]

mac80211: Change default tx_sk_pacing_shift to 7 [Linux 5.0]

This Linux kernel change "mac80211: Change default tx_sk_pacing_shift to 7" is included in the Linux 5.0 release. This change is authored by Toke Høiland-Jørgensen <toke [at]> on Thu Feb 21 18:29:36 2019 +0100. The commit for this change in Linux stable tree is 5c14a4d (patch).

mac80211: Change default tx_sk_pacing_shift to 7

When we did the original tests for the optimal value of sk_pacing_shift, we
came up with 6 ms of buffering as the default. Sadly, 6 is not a power of
two, so when picking the shift value I erred on the size of less buffering
and picked 4 ms instead of 8. This was probably wrong; those 2 ms of extra
buffering makes a larger difference than I thought.

So, change the default pacing shift to 7, which corresponds to 8 ms of
buffering. The point of diminishing returns really kicks in after 8 ms, and
so having this as a default should cut down on the need for extensive
per-device testing and overrides needed in the drivers.

Cc: [email protected]
Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 net/mac80211/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 87a7299..977dea43 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -615,13 +615,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
     * We need a bit of data queued to build aggregates properly, so
     * instruct the TCP stack to allow more than a single ms of data
     * to be queued in the stack. The value is a bit-shift of 1
-    * second, so 8 is ~4ms of queued data. Only affects local TCP
+    * second, so 7 is ~8ms of queued data. Only affects local TCP
     * sockets.
     * This is the default, anyhow - drivers may need to override it
     * for local reasons (longer buffers, longer completion time, or
     * similar).
-   local->hw.tx_sk_pacing_shift = 8;
+   local->hw.tx_sk_pacing_shift = 7;

    /* set up some defaults */
    local->hw.queues = 1;

Leave a Reply

Your email address will not be published. Required fields are marked *