From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Rajkumar Manoharan <rmanohar@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
make-wifi-fast@lists.bufferbloat.net,
Felix Fietkau <nbd@nbd.name>, Kan Yan <kyan@google.com>,
linux-wireless-owner@vger.kernel.org
Subject: Re: [Make-wifi-fast] [PATCH RFC v5 3/4] mac80211: Add airtime accounting and scheduling to TXQs
Date: Tue, 16 Oct 2018 12:20:12 +0200 [thread overview]
Message-ID: <87a7nery5f.fsf@toke.dk> (raw)
In-Reply-To: <a582bd5865268ac69b0105c22dd927a3@codeaurora.org>
Rajkumar Manoharan <rmanohar@codeaurora.org> writes:
> On 2018-10-12 03:16, Toke Høiland-Jørgensen wrote:
>>
>> - Just loop with the smaller quantum until one of the stations go into
>> the positive (what we do now).
>>
>> - Go through all active stations, find the one that is closest being in
>> the positive, and add that amount to the quantum. I.e., something
>> like (assuming no station has positive deficit; if one does, you
>> don't
>> want to add anything anyway):
>>
>> to_add = -(max(stn.deficit) for stn in active stations)
>> for stn in active stations:
>> stn.deficit += to_add + stn.weight
>>
> Toke,
>
> Sorry for the delayed response. I did lot of experiments. Below are my
> observations.
> Sorry for lengthy reply.
>
> In current model, next_txq() is main routine that serves DRR and
> fairness is enforced by serving only only first txq. Here the first
> node could be either newly initiated traffic or returned node by
> return_txq(). This works perfectly as long as the driver is running
> any RR algo.
>
> Whereas in ath10k, firmware runs its own RR in pull mode and builds
> txq list based on driver's hostq table. In this case it can not be
> simply assumed that firmware always gives fetch request for first node
> of mac80211's txq list. i.e both RR algo could be out of sync.
So I'm wondering why they don't sync; if the hardware is just doing RR
scheduling, eventually it should hit the TXQ that's first in the queue
and keep in sync after that?
How are you testing, and what metrics are you using?
> On an idle condition a single fetch indication can dequeue ~190 msdus
> from each tid of give stn list.
Wow, that sounds pretty bad. Guess we need the airtime queue limits! :)
> diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
> index 625a4ab37ea0..269ae8311056 100644
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -2352,7 +2352,7 @@ static void ath10k_htt_rx_tx_fetch_ind(struct ath10k *ar, struct sk_buff *skb)
> num_msdus++;
> num_bytes += ret;
> }
> - ieee80211_return_txq(hw, txq);
> + ieee80211_return_txq(hw, txq, true);
I don't like the extra parameter; a similar one was in an earlier
version of my patch set, but I'd prefer that mac80211 just does the
right thing...
Do I understand it correctly that push/pull mode is selected solely by
hardware/firmware versions? Because in that case we could split it into
two feature flags instead...
> @@ -3670,13 +3670,8 @@ bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
> if (sta->airtime[ac].deficit >= 0)
> goto out;
>
> - list_for_each_entry(txqi, &local->active_txqs[ac], schedule_order) {
> - if (!txqi->txq.sta)
> - continue;
> - sta = container_of(txqi->txq.sta, struct sta_info, sta);
> - sta->airtime[ac].deficit +=
> - (IEEE80211_TXQ_MAY_TX_QUANTUM * sta->airtime_weight);
> - }
> + sta->airtime[ac].deficit += sta->airtime_weight;
> + list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
I'm wondering whether this actually succeeds in achieving fairness? This
basically allows a TXQ to be plucked from any point in the list, get a
quantum increase and be put back on, no matter the state of other TXQs.
Did you test how well the stations divide their airtime? And if so,
under which conditions?
-Toke
next prev parent reply other threads:[~2018-10-16 10:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 12:32 [Make-wifi-fast] [PATCH RFC v5 0/4] Move TXQ scheduling and airtime fairness into mac80211 Toke Høiland-Jørgensen
2018-10-09 12:32 ` [Make-wifi-fast] [PATCH RFC v5 1/4] mac80211: Add TXQ scheduling API Toke Høiland-Jørgensen
2018-10-09 12:32 ` [Make-wifi-fast] [PATCH RFC v5 2/4] cfg80211: Add airtime statistics and settings Toke Høiland-Jørgensen
2018-10-09 12:32 ` [Make-wifi-fast] [PATCH RFC v5 4/4] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs Toke Høiland-Jørgensen
2018-10-09 12:32 ` [Make-wifi-fast] [PATCH RFC v5 3/4] mac80211: Add airtime accounting and scheduling to TXQs Toke Høiland-Jørgensen
2018-10-10 4:52 ` Rajkumar Manoharan
2018-10-10 11:15 ` Toke Høiland-Jørgensen
2018-10-10 23:20 ` Rajkumar Manoharan
2018-10-11 10:38 ` Toke Høiland-Jørgensen
2018-10-12 7:38 ` Rajkumar Manoharan
2018-10-12 10:16 ` Toke Høiland-Jørgensen
2018-10-16 7:07 ` Rajkumar Manoharan
2018-10-16 10:20 ` Toke Høiland-Jørgensen [this message]
2018-10-13 7:09 ` Dave Taht
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=87a7nery5f.fsf@toke.dk \
--to=toke@toke.dk \
--cc=kyan@google.com \
--cc=linux-wireless-owner@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=make-wifi-fast@lists.bufferbloat.net \
--cc=nbd@nbd.name \
--cc=rmanohar@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