All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Ryan Hsu <ryanhsu@qti.qualcomm.com>,
	"make-wifi-fast@lists.bufferbloat.net"
	<make-wifi-fast@lists.bufferbloat.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: Adjust TSQ pacing shift
Date: Wed, 14 Feb 2018 09:18:43 +0100	[thread overview]
Message-ID: <41B51538-B1F5-4611-AAB4-923C585FF3DA@toke.dk> (raw)
In-Reply-To: <40f644f6-ecfa-c31b-ce98-3491c954d6b1@qti.qualcomm.com>



On 14 February 2018 01:43:25 CET, Ryan Hsu <ryanhsu@qti=2Equalcomm=2Ecom> =
wrote:
>On 02/02/2018 07:11 AM, Toke H=C3=B8iland-J=C3=B8rgensen wrote:
>
>> Since we now have the convenient helper to do so, actually adjust the
>> TSQ pacing shift for packets going out over a WiFi interface=2E This
>> significantly improves throughput for locally-originated TCP
>> connections=2E The default pacing shift of 10 corresponds to ~1ms of
>> queued packet data=2E Adjusting this to a shift of 8 (i=2Ee=2E ~4ms)
>improves
>> 1-hop throughput for ath9k by a factor of 3, whereas increasing it
>more
>> has diminishing returns=2E
>>
>> 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=2E21 Mbps (pre-patch)
>> sk_pacing_shift  9:  78=2E17 Mbps
>> sk_pacing_shift  8: 123=2E94 Mbps
>> sk_pacing_shift  7: 128=2E31 Mbps
>>
>> Latency for competing flows increases from ~3 ms to ~10 ms with this
>> change=2E 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)=2E
>>
>> Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke=2Edk>
>> ---
>>  net/mac80211/tx=2Ec | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/net/mac80211/tx=2Ec b/net/mac80211/tx=2Ec
>> index 25904af38839=2E=2E69722504e3e1 100644
>> --- a/net/mac80211/tx=2Ec
>> +++ b/net/mac80211/tx=2Ec
>> @@ -3574,6 +3574,14 @@ void __ieee80211_subif_start_xmit(struct
>sk_buff *skb,
>>  	if (!IS_ERR_OR_NULL(sta)) {
>>  		struct ieee80211_fast_tx *fast_tx;
>> =20
>> +		/* 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=2E The value is a bit-shift of 1
>> +		 * second, so 8 is ~4ms of queued data=2E Only affects local TCP
>> +		 * sockets=2E
>> +		 */
>> +		sk_pacing_shift_update(skb->sk, 8);
>> +
>>  		fast_tx =3D rcu_dereference(sta->fast_tx);
>> =20
>>  		if (fast_tx &&
>
>I knew increasing the value doesn't help much after 8 for ath9k, but I
>ran a
>testing on ath10k that 6 or 7 is having optimal number=2E
>Since ath10k/11ac device has higher bandwidth than ath9k/11n, can we
>consider
>to use to 6 or 7 to accommodate that effect?
>
>   tx (mbps) cpu usage (%)
>5    404       28=2E5
>6    398       13=2E8
>7    401        8
>8    378        5
>9    230        4=2E5
>10   79=2E6       2

Why does the CPU usage go up >7? Also, what is the latency impact of each =
of those values?

-Toke

  reply	other threads:[~2018-02-14  8:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 15:11 [PATCH] mac80211: Adjust TSQ pacing shift Toke Høiland-Jørgensen
2018-02-02 16:55 ` [Make-wifi-fast] " dpreed
2018-02-02 20:13   ` Arend van Spriel
2018-02-14  0:43 ` Ryan Hsu
2018-02-14  8:18   ` Toke Høiland-Jørgensen [this message]
2018-02-14  8:23     ` [Make-wifi-fast] " Jonathan Morton
2018-03-02  1:09       ` Ryan Hsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41B51538-B1F5-4611-AAB4-923C585FF3DA@toke.dk \
    --to=toke@toke.dk \
    --cc=linux-wireless@vger.kernel.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=ryanhsu@qti.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.