From: "Toke Høiland-Jørgensen" <toke@redhat.com> To: Kan Yan <kyan@google.com> Cc: Johannes Berg <johannes@sipsolutions.net>, linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, ath10k@lists.infradead.org, John Crispin <john@phrozen.org>, Lorenzo Bianconi <lorenzo@kernel.org>, Felix Fietkau <nbd@nbd.name>, Rajkumar Manoharan <rmanohar@codeaurora.org>, Kevin Hayes <kevinhayes@google.com> Subject: Re: [PATCH v2 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue Date: Thu, 17 Oct 2019 11:44:27 +0200 [thread overview] Message-ID: <87o8yfg0zo.fsf@toke.dk> (raw) In-Reply-To: <CA+iem5s=xbzZ5goaBO4tZWUKVQRaXb+SnB34NPCppej9mi8sAA@mail.gmail.com> Kan Yan <kyan@google.com> writes: > Hi Toke, > > Thanks for getting this done! I will give it a try in the next few > days. A few comments: > >> The estimated airtime for each skb is stored in the tx_info, so we can >> subtract the same amount from the running total when the skb is freed or >> recycled. > > Looks like ath10k driver zero out the info->status before calling > ieee80211_tx_status(...): > int ath10k_txrx_tx_unref(struct ath10k_htt *htt, > const struct htt_tx_done *tx_done) > { > ... > info = IEEE80211_SKB_CB(msdu); > memset(&info->status, 0, sizeof(info->status)); > ... > ieee80211_tx_status(htt->ar->hw, msdu); > } Ah, bugger; I was afraid we'd run into this. A quick grep indicates that it's only ath10k and iwl that do this, though, so it's probably manageable to just fix this. I think the simplest solution is just to restore the field after clearing, no? > We need either restore the info->status.tx_time_est or calling > ieee80211_sta_update_pending_airtime() in ath10k before tx_time_est > get erased. > >> + if (local->airtime_flags & AIRTIME_USE_AQL) { >> + airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta, >> + skb->len + 38); > > I think it is better to put the "+ 38" that takes care of the header > overhead inside ieee80211_calc_expected_tx_airtime(). Hmm, no strong opinion about this; but yeah, since we have a dedicated function for this use I guess there's no harm in adding it there :) -Toke
WARNING: multiple messages have this Message-ID (diff)
From: "Toke Høiland-Jørgensen" <toke@redhat.com> To: Kan Yan <kyan@google.com> Cc: Rajkumar Manoharan <rmanohar@codeaurora.org>, Kevin Hayes <kevinhayes@google.com>, make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, John Crispin <john@phrozen.org>, Johannes Berg <johannes@sipsolutions.net>, Lorenzo Bianconi <lorenzo@kernel.org>, Felix Fietkau <nbd@nbd.name> Subject: Re: [PATCH v2 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue Date: Thu, 17 Oct 2019 11:44:27 +0200 [thread overview] Message-ID: <87o8yfg0zo.fsf@toke.dk> (raw) In-Reply-To: <CA+iem5s=xbzZ5goaBO4tZWUKVQRaXb+SnB34NPCppej9mi8sAA@mail.gmail.com> Kan Yan <kyan@google.com> writes: > Hi Toke, > > Thanks for getting this done! I will give it a try in the next few > days. A few comments: > >> The estimated airtime for each skb is stored in the tx_info, so we can >> subtract the same amount from the running total when the skb is freed or >> recycled. > > Looks like ath10k driver zero out the info->status before calling > ieee80211_tx_status(...): > int ath10k_txrx_tx_unref(struct ath10k_htt *htt, > const struct htt_tx_done *tx_done) > { > ... > info = IEEE80211_SKB_CB(msdu); > memset(&info->status, 0, sizeof(info->status)); > ... > ieee80211_tx_status(htt->ar->hw, msdu); > } Ah, bugger; I was afraid we'd run into this. A quick grep indicates that it's only ath10k and iwl that do this, though, so it's probably manageable to just fix this. I think the simplest solution is just to restore the field after clearing, no? > We need either restore the info->status.tx_time_est or calling > ieee80211_sta_update_pending_airtime() in ath10k before tx_time_est > get erased. > >> + if (local->airtime_flags & AIRTIME_USE_AQL) { >> + airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta, >> + skb->len + 38); > > I think it is better to put the "+ 38" that takes care of the header > overhead inside ieee80211_calc_expected_tx_airtime(). Hmm, no strong opinion about this; but yeah, since we have a dedicated function for this use I guess there's no harm in adding it there :) -Toke _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2019-10-17 9:44 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-15 17:18 [PATCH v2 0/4] Add Airtime Queue Limits (AQL) to mac80211 Toke Høiland-Jørgensen 2019-10-15 17:18 ` Toke Høiland-Jørgensen 2019-10-15 17:18 ` [PATCH v2 1/4] mac80211: Rearrange ieee80211_tx_info to make room for tx_time_est Toke Høiland-Jørgensen 2019-10-15 17:18 ` Toke Høiland-Jørgensen 2019-10-18 0:50 ` Kan Yan 2019-10-18 0:50 ` Kan Yan 2019-10-18 10:15 ` Toke Høiland-Jørgensen 2019-10-18 10:15 ` Toke Høiland-Jørgensen 2019-10-18 12:21 ` Johannes Berg 2019-10-18 12:21 ` Johannes Berg 2019-10-18 13:31 ` Toke Høiland-Jørgensen 2019-10-18 13:31 ` Toke Høiland-Jørgensen 2019-10-18 13:48 ` Johannes Berg 2019-10-18 13:48 ` Johannes Berg 2019-10-18 14:01 ` Toke Høiland-Jørgensen 2019-10-18 14:01 ` Toke Høiland-Jørgensen 2019-10-18 14:07 ` Johannes Berg 2019-10-18 14:07 ` Johannes Berg 2019-10-18 14:22 ` Toke Høiland-Jørgensen 2019-10-18 14:22 ` Toke Høiland-Jørgensen 2019-10-18 14:14 ` Johannes Berg 2019-10-18 14:14 ` Johannes Berg 2019-10-18 14:30 ` Toke Høiland-Jørgensen 2019-10-18 14:30 ` Toke Høiland-Jørgensen 2019-10-18 12:35 ` Johannes Berg 2019-10-18 12:35 ` Johannes Berg 2019-10-18 13:01 ` Ben Greear 2019-10-18 13:01 ` Ben Greear 2019-10-15 17:18 ` [PATCH v2 2/4] mac80211: Import airtime calculation code from mt76 Toke Høiland-Jørgensen 2019-10-15 17:18 ` Toke Høiland-Jørgensen 2019-10-15 17:19 ` [PATCH v2 3/4] mac80211: Implement Airtime-based Queue Limit (AQL) Toke Høiland-Jørgensen 2019-10-15 17:19 ` Toke Høiland-Jørgensen 2019-10-15 17:19 ` [PATCH v2 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue Toke Høiland-Jørgensen 2019-10-15 17:19 ` Toke Høiland-Jørgensen 2019-10-17 0:33 ` Kan Yan 2019-10-17 0:33 ` Kan Yan 2019-10-17 9:44 ` Toke Høiland-Jørgensen [this message] 2019-10-17 9:44 ` Toke Høiland-Jørgensen 2019-10-17 9:57 ` [Make-wifi-fast] " Sebastian Moeller 2019-10-17 9:57 ` Sebastian Moeller 2019-10-17 10:24 ` Toke Høiland-Jørgensen 2019-10-17 10:24 ` Toke Høiland-Jørgensen 2019-10-17 10:25 ` Sebastian Moeller 2019-10-17 10:25 ` Sebastian Moeller 2019-10-18 1:11 ` Kan Yan 2019-10-18 1:11 ` Kan Yan 2019-10-18 14:15 ` Johannes Berg 2019-10-18 14:15 ` Johannes Berg
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=87o8yfg0zo.fsf@toke.dk \ --to=toke@redhat.com \ --cc=ath10k@lists.infradead.org \ --cc=johannes@sipsolutions.net \ --cc=john@phrozen.org \ --cc=kevinhayes@google.com \ --cc=kyan@google.com \ --cc=linux-wireless@vger.kernel.org \ --cc=lorenzo@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: linkBe 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.