]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/mac80211-change-default-tx_sk_pacing_shift-to-7.patch
Linux 4.14.105
[thirdparty/kernel/stable-queue.git] / queue-4.19 / mac80211-change-default-tx_sk_pacing_shift-to-7.patch
1 From 5c14a4d05f68415af9e41a4e667d1748d41d1baf Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
3 Date: Thu, 21 Feb 2019 18:29:36 +0100
4 Subject: mac80211: Change default tx_sk_pacing_shift to 7
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Toke Høiland-Jørgensen <toke@redhat.com>
10
11 commit 5c14a4d05f68415af9e41a4e667d1748d41d1baf upstream.
12
13 When we did the original tests for the optimal value of sk_pacing_shift, we
14 came up with 6 ms of buffering as the default. Sadly, 6 is not a power of
15 two, so when picking the shift value I erred on the size of less buffering
16 and picked 4 ms instead of 8. This was probably wrong; those 2 ms of extra
17 buffering makes a larger difference than I thought.
18
19 So, change the default pacing shift to 7, which corresponds to 8 ms of
20 buffering. The point of diminishing returns really kicks in after 8 ms, and
21 so having this as a default should cut down on the need for extensive
22 per-device testing and overrides needed in the drivers.
23
24 Cc: stable@vger.kernel.org
25 Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
26 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28
29
30 ---
31 net/mac80211/tx.c | 4 ++--
32 1 file changed, 2 insertions(+), 2 deletions(-)
33
34 --- a/net/mac80211/tx.c
35 +++ b/net/mac80211/tx.c
36 @@ -3614,10 +3614,10 @@ void __ieee80211_subif_start_xmit(struct
37 /* We need a bit of data queued to build aggregates properly, so
38 * instruct the TCP stack to allow more than a single ms of data
39 * to be queued in the stack. The value is a bit-shift of 1
40 - * second, so 8 is ~4ms of queued data. Only affects local TCP
41 + * second, so 7 is ~8ms of queued data. Only affects local TCP
42 * sockets.
43 */
44 - sk_pacing_shift_update(skb->sk, 8);
45 + sk_pacing_shift_update(skb->sk, 7);
46
47 fast_tx = rcu_dereference(sta->fast_tx);
48