From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id BC7BC3B29E for ; Mon, 7 Sep 2020 06:29:40 -0400 (EDT) Received: by mail-lj1-x230.google.com with SMTP id y4so15498191ljk.8 for ; Mon, 07 Sep 2020 03:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=i2cat.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qLIhAli2eARXnkDVYk2DAHYB3dZXm5IJ9e1cWnuNTgU=; b=ZbOmvSYLyNsZ3xR8XDYTL169AndTO/YEn7BktFlD6J9RT4jKFWWPFXAFE9f4J4au6N NuQNCLyEBTzVPgk9NIZpUWg7M4pKDkb9ZdNRn8zmg+JJriyLheY0lx2Anyk8m0H6pvUa NvCz2sVam3sxniStkZYnkvM2ofYP4L/ZckBnrgEwU2IlJsNB3CJBhWIhOFaQb79GmeQG rLICWUj60gQyi+t0qSuXJKcqDMUzkbvXQqZEgNoAgL1FArmmf2dOjbmdrAFPsVafACrS 3cVoy72qNgOYIvGGGEtLMNeDwl6gipNOd4NBMimM9SAWUPX0f+d4cmSv9tcKv4re3lPV yhPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qLIhAli2eARXnkDVYk2DAHYB3dZXm5IJ9e1cWnuNTgU=; b=Xb3dqyjubq5yfsyLT8jaojiKUroGOec1kO4TSxwtxq2uAqoXLes5jrQND9V1qwcbPS IZiNzMsoTbO5WNrQ3DgHFh+b8af2/jBL+ysS1kFwcTv0oPdaewYmpI1qz+b/0+k34IFy npMg8Q+4wZV7jN/iblQ3Bv2Rg9RNMVllbT8qSqHAVfA+a45EJ+RWb/na1Ttell/doMcS DSTRtItWKuJLI9hemqLQldF7Tp7UFfV71dwmOAwa7QCm4NbMt8Zqd2kznoOnqgCCXQlz 0kCc98gqZURv7eppnPTga8R6Vrkn9CFqmvf8yTASP0Yc2EGdbo0/hjPFzFdxo3BpBpv2 1tdA== X-Gm-Message-State: AOAM530ATo3ocAxBKAH45KyBrmzOp2RH9f4eHkJiaU3tBwGL7UeWL8tJ FLh2a3sg3uCG0rmJETuUmimHTQs4gw699uS7ukVvUA== X-Google-Smtp-Source: ABdhPJzm/CP+OibkvFGROAYJLrOQ/1PILX+d7eJwKN/dWPdwEZ4o8gTHibMFNV7xpVzbi24Y/vVzCh7HDKT2ybkdOlQ= X-Received: by 2002:a2e:a0d3:: with SMTP id f19mr1992758ljm.325.1599474579483; Mon, 07 Sep 2020 03:29:39 -0700 (PDT) MIME-Version: 1.0 References: <87zh8uruou.fsf@toke.dk> <87366ei2x7.fsf@toke.dk> <87lfk4ftnc.fsf@toke.dk> In-Reply-To: <87lfk4ftnc.fsf@toke.dk> From: Miguel Catalan Cid Date: Mon, 7 Sep 2020 12:29:28 +0200 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org Content-Type: multipart/alternative; boundary="00000000000023404505aeb6b243" Subject: Re: [Make-wifi-fast] Support for airtime scheduling using ath10k X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2020 10:29:41 -0000 --00000000000023404505aeb6b243 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, after doing some tests with different ath10k Wi-Fi cards and clients, I found the following behaviour when combining AQL and the airtime scheduler: - When using the default AQL limits (threshold 24000, limits per AC 5000/12000), the airtime scheduler is not working at all, regardless of the airtime weights of the STAs. Indeed, in some cases, slower stations were able to use a higher amount of airtime, leading to unfairness. I was thinking that maybe the default AQL limits are too high to these slow stations, allowing them to obtain too much pending airtime. I already used the last patches from Felix Fietkau with the same results. - Indeed, I was able to activate the airtime scheduler by fixing lower AQL limits (e.g. threshold of 5000, limits per AC 0/5000). This way, it seems that the STAs start competing again for the airtime, and their behaviour follows the airtime weights. However, slower STAs lose a bit of performance due to these lower limits. - The airtime weights have to be higher (e.g. 10000 vs 20000 to obtain a 33% vs 66% relation); I found the same behaviour using ath9k and 11n cards, so I guess this is due to the aggregation of packets. Looking into the code, it seems that the key airtime check is the one in ieee80211_tx_dequeue. To enable the airtime scheduling, the "ieee80211_txq_airtime_check" function has to return false more usually; maybe it is just a matter of adjusting the AQL limits according to the airtime weights or to modify a bit the "ieee80211_txq_airtime_check" function to consider the airtime weight or the deficit of the stations. Cheers, Miguel. El mar., 30 jun. 2020 a las 17:41, Toke H=C3=B8iland-J=C3=B8rgensen () escribi=C3=B3: > Miguel Catalan Cid writes: > > > Hi, > > > > Do we need to use a specific firmware? It's ok to use the last one from > > kvalo, or should we use the one from candelatech? > > Shouldn't matter, I think; the airtime scheduler tries to do its thing > in software. It does have to work around the firmware, to a certain > extent, though, which I suspect is why it doesn't work quite so well as > on ath9k. > > Incidentally, this "impedance mismatch" between scheduler and firmware > is what this patch was supposed to fix: > > > https://lore.kernel.org/linux-wireless/20191222172423.131033-1-toke@redha= t.com/ > > Never did get around to respinning it, so not sure if it still applies. > If it does, you could try taking it for a spin; otherwise I can try > updating it so you can apply it and test :) > > -Toke > > --=20 Miguel Catal=C3=A1n Cid, PhD Mobile Wireless Internet Group (MWI) i2CAT Foundation, Barcelona, Spain http://www.i2cat.net/ --00000000000023404505aeb6b243 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

after doing some tests with differe= nt ath10k Wi-Fi cards and clients, I found the following behaviour when com= bining AQL and the airtime scheduler:=C2=A0

- When= using the default AQL limits (threshold 24000, limits per AC 5000/12000), = the airtime scheduler is not working at all, regardless=C2=A0of the airtime= weights of the STAs. Indeed, in some cases, slower stations were able to u= se a higher amount=C2=A0of airtime, leading to unfairness. I was thinking t= hat maybe the default AQL limits are too high to these slow stations, allow= ing them to obtain too much pending airtime. I already used the last patche= s from=C2=A0Felix=C2=A0Fietkau with the sam= e results.=C2=A0

- Indeed, I was able to activate = the airtime scheduler by fixing lower AQL limits (e.g. threshold of 5000, l= imits per AC 0/5000). This way, it seems that the STAs start competing agai= n for the airtime, and their behaviour follows the airtime weights. However= ,=C2=A0 slower STAs lose a bit of performance due to=C2=A0these lower limit= s.=C2=A0

- The airtime weights have to be higher (= e.g. 10000 vs 20000 to obtain a 33% vs 66% relation); I found the same beha= viour using ath9k and 11n cards, so I guess this is due to the aggregation = of packets.=C2=A0=C2=A0

Looking into the code, it = seems that the key airtime check is the one in=C2=A0ieee80211_tx_dequeue. T= o enable the airtime scheduling, the "ieee80211_txq_airtime_check"= ; function has to return false more usually; maybe it is just a matter of a= djusting the AQL limits according to the airtime weights or to modify a bit= the "ieee80211_txq_airtime_check" function to consider the airti= me weight or the deficit of the stations.=C2=A0

Ch= eers,
Miguel.=C2=A0

El mar., 30 jun. 2020 a las 17:41, Toke = H=C3=B8iland-J=C3=B8rgensen (<toke@redhat.com>) escribi=C3=B3:
Miguel Catalan Cid <miguel.catalan@i2cat.net&= gt; writes:

> Hi,
>
> Do we need to use a specific firmware? It's ok to use the last one= from
> kvalo, or should we use the one from candelatech?

Shouldn't matter, I think; the airtime scheduler tries to do its thing<= br> in software. It does have to work around the firmware, to a certain
extent, though, which I suspect is why it doesn't work quite so well as=
on ath9k.

Incidentally, this "impedance mismatch" between scheduler and fir= mware
is what this patch was supposed to fix:

https://lore.kernel.o= rg/linux-wireless/20191222172423.131033-1-toke@redhat.com/

Never did get around to respinning it, so not sure if it still applies.
If it does, you could try taking it for a spin; otherwise I can try
updating it so you can apply it and test :)

-Toke



--
Miguel Cata= l=C3=A1n Cid, PhD

Mobile Wireless Internet Group (MWI)
i2CAT Foun= dation, Barcelona, Spain
http://www.i2cat.net/
--00000000000023404505aeb6b243--