From: Kan Yan <kyan@google.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Yibo Zhao <yiboz@codeaurora.org>,
Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org,
make-wifi-fast@lists.bufferbloat.net,
John Crispin <john@phrozen.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Felix Fietkau <nbd@nbd.name>,
linux-wireless-owner@vger.kernel.org
Subject: Re: [Make-wifi-fast] [PATCH RFC/RFT 4/4] mac80211: Apply Airtime-based Queue Limit (AQL) on packet dequeue
Date: Wed, 25 Sep 2019 17:27:31 -0700 [thread overview]
Message-ID: <CA+iem5sg-YpkBX4VQPzqibN0YApMxtwFsGqjK2cUUrxD_52zPw@mail.gmail.com> (raw)
In-Reply-To: <87mues35d4.fsf@toke.dk>
> Yes, please do! AFAICT, the main difference is that your version keeps
> the airtime calculation itself in the driver, while mine passes up the
> rate and lets mac80211 do the calculation of airtime. Other than that,
> the differences are minor, no?
> I'm not actually sure which approach is best; I suspect doing all the
> accounting in mac80211 will help with integrating this into drivers that
> use minstrel; we can just add a hook in that and be done with it.
> Whereas if the driver has to do the accounting, we would need to add
> that to each driver (mt76, iwl(?)).
Yes, they are essentially doing the same thing. I kept the airtime
estimation code in the ath10k just because it is already there. It is
better to do that in mac80211, so it doesn't have to be duplicated for
each driver and avoids the overhead of updating the estimated airtime
from host driver to mac80211.
> But of course, doing things in mac80211 depends on stuffing even more
> stuff into the already overloaded cb field; and I'm not actually
> entirely sure what I've done with that will actually work. WDYT?
Either way a field in skb cb is needed to record the estimated
airtime. The 'tx_time_est' shares the space with the codel
'enque_time' looks fine to me, as their lifetime doesn't overlap.
There is another minor difference in the ChromiumOs version, which
actually address the issue Yibo just asked:
> Meanwhile, airtime_queued will also limit the situation that we only
> have a station for transmission. Not sure if the peak throughput will be
> impacted. I believe it may work fine with 11ac in chromiumos, how about
> 11n and 11a?
My version has two AQL limits, a smaller per station limit (4ms) and a
larger per interface limit (24 ms). When the per interface limit has
not been reached, stations are allowed to transmit up to 1/3 of the
interface limits (8ms). This way it balance the needs to control
latency when there are a lot of stations and to get good throughput
benchmark numbers with a single client. In my test, I found increasing
the AQL limit to beyond 8 ms doesn't helps peak throughput on 4x4
ath10k chipset.
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1734867/3/net/mac80211/tx.c#b3734
> Of course we'll also have to eventually integrate this with the other
> series that Yibo recently re-posted (the virtual time scheduler). I
> think that will be relatively straight forward, except I'm not sure your
> atomic patches will work when we also have to update the rbtree. Any
> thoughts on that series in general?
I do like the virtual time scheduler patchset. It makes it easier to
schedule an arbitrary tx queue and handles ath10k's firmware pulling
mode better. I will give it a try.
> Yup, makes sense. Looking at the version you linked to, though, it seems
> you're calling ieee80211_sta_register_airtime() with the estimated value
> as well? So are you double-accounting airtime, or are you adjusting for
> the accurate values somewhere else I don't see in that series?
It does not double count airtime, just both the airtime fairness
scheduler and AQL use the estimate airtime. It is on an older tree and
still doesn't have the patch that provides the fw airtime:
https://patchwork.kernel.org/patch/10684689
On Wed, Sep 25, 2019 at 5:52 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> Yibo Zhao <yiboz@codeaurora.org> writes:
>
> > On 2019-09-25 16:11, Toke Høiland-Jørgensen wrote:
> >> Yibo Zhao <yiboz@codeaurora.org> writes:
> >>
> >>> So if it is going to work together with virtual time based mechanism
> >>> in
> >>> the future, the Tx criteria will be met both of below conditions,
> >>> 1. Lower than g_vt
> >>> 2. Lower than IEEE80211_AIRTIME_QUEUE_LIMIT
> >>
> >>> Are we going to maintain two kinds of airtime that one is from
> >>> estimation and the other is basically from FW reporting?
> >>
> >> Yes, that was my plan. For devices that don't have FW reporting of
> >> airtime, we can fall back to the estimation; but if we do have FW
> >> reporting that is most likely going to be more accurate, so better to
> >> use that for fairness...
> >
> > Do you mean we will use airtime reported by FW to calculate
> > local->airtime_queued in case we have FW reporting airtime?
>
> No, the opposite; if the firmware can't report airtime, we can use the
> estimated values to feed into report_airtime() for the fairness
> calculation...
>
> -Toke
>
next prev parent reply other threads:[~2019-09-26 0:27 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 12:22 [Make-wifi-fast] [PATCH RFC/RFT 0/4] Add Airtime Queue Limits (AQL) to mac80211 Toke Høiland-Jørgensen
2019-09-19 12:22 ` [Make-wifi-fast] [PATCH RFC/RFT 1/4] mac80211: Rearrange ieee80211_tx_info to make room for tx_time_est Toke Høiland-Jørgensen
2019-10-01 8:44 ` Johannes Berg
2019-10-01 9:08 ` Toke Høiland-Jørgensen
2019-10-01 9:12 ` Johannes Berg
2019-10-01 9:39 ` Toke Høiland-Jørgensen
2019-09-19 12:22 ` [Make-wifi-fast] [PATCH RFC/RFT 2/4] mac80211: Add API function to set the last TX bitrate for a station Toke Høiland-Jørgensen
2019-10-01 8:46 ` Johannes Berg
2019-10-01 9:09 ` Toke Høiland-Jørgensen
2019-09-19 12:22 ` [Make-wifi-fast] [PATCH RFC/RFT 3/4] ath10k: Pass last TX bitrate up to mac80211 Toke Høiland-Jørgensen
2019-09-19 12:22 ` [Make-wifi-fast] [PATCH RFC/RFT 4/4] mac80211: Apply Airtime-based Queue Limit (AQL) on packet dequeue Toke Høiland-Jørgensen
2019-09-19 17:44 ` Peter Oh
[not found] ` <879913e9-4254-1381-07f6-d860fb0b8de0@candelatech.com>
2019-09-19 17:54 ` Peter Oh
2019-09-19 18:03 ` Peter Oh
2019-09-19 18:18 ` Dave Taht
2019-09-19 20:09 ` John Yates
2019-09-19 20:15 ` Toke Høiland-Jørgensen
2019-09-19 18:03 ` Toke Høiland-Jørgensen
2019-09-20 12:06 ` Lorenzo Bianconi
2019-09-20 12:54 ` Toke Høiland-Jørgensen
2019-09-20 13:06 ` Lorenzo Bianconi
2019-09-20 13:32 ` Toke Høiland-Jørgensen
2019-09-20 22:38 ` Kan Yan
2019-09-20 22:55 ` Kan Yan
2019-09-21 12:11 ` Toke Høiland-Jørgensen
2019-09-25 7:37 ` Yibo Zhao
2019-09-25 8:11 ` Toke Høiland-Jørgensen
2019-09-25 11:54 ` Yibo Zhao
2019-09-25 12:52 ` Toke Høiland-Jørgensen
2019-09-26 0:27 ` Kan Yan [this message]
2019-09-26 0:34 ` Kan Yan
2019-09-26 5:57 ` Toke Høiland-Jørgensen
2019-09-26 6:04 ` Toke Høiland-Jørgensen
2019-09-26 12:53 ` Felix Fietkau
2019-09-26 13:17 ` Toke Høiland-Jørgensen
2019-09-26 13:47 ` Felix Fietkau
2019-09-26 15:19 ` Toke Høiland-Jørgensen
2019-09-27 2:42 ` Kan Yan
2019-09-27 6:12 ` Toke Høiland-Jørgensen
2019-09-27 9:20 ` Yibo Zhao
2019-09-28 20:24 ` Kan Yan
2019-09-29 19:18 ` Toke Høiland-Jørgensen
2019-10-01 4:47 ` Kan Yan
2019-10-01 6:57 ` Toke Høiland-Jørgensen
2019-09-19 14:12 ` [Make-wifi-fast] [PATCH RFC/RFT 0/4] Add Airtime Queue Limits (AQL) to mac80211 Toke Høiland-Jørgensen
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
List information: https://lists.bufferbloat.net/postorius/lists/make-wifi-fast.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+iem5sg-YpkBX4VQPzqibN0YApMxtwFsGqjK2cUUrxD_52zPw@mail.gmail.com \
--to=kyan@google.com \
--cc=johannes@sipsolutions.net \
--cc=john@phrozen.org \
--cc=linux-wireless-owner@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=make-wifi-fast@lists.bufferbloat.net \
--cc=nbd@nbd.name \
--cc=toke@redhat.com \
--cc=yiboz@codeaurora.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox