From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org,
make-wifi-fast@lists.bufferbloat.net,
Felix Fietkau <nbd@nbd.name>
Subject: Re: [Make-wifi-fast] [PATCH RFC v3 2/4] mac80211: Add airtime accounting and scheduling to TXQs
Date: Tue, 11 Sep 2018 17:07:45 -0700 [thread overview]
Message-ID: <e90d3540e3c92c6e894217982cd77ff1@codeaurora.org> (raw)
In-Reply-To: <87h8ixli4s.fsf@toke.dk>
On 2018-09-10 04:13, Toke Høiland-Jørgensen wrote:
> Johannes Berg <johannes@sipsolutions.net> writes:
>>> - txqi->flags & (1<<IEEE80211_TXQ_STOP) ? "STOP" : "RUN",
>>> - txqi->flags & (1<<IEEE80211_TXQ_AMPDU) ? " AMPDU" : "",
>>> - txqi->flags & (1<<IEEE80211_TXQ_NO_AMSDU) ? " NO-AMSDU" :
>>> "");
>>> + txqi->flags & (1 << IEEE80211_TXQ_STOP) ? "STOP" : "RUN",
>>> + txqi->flags & (1 << IEEE80211_TXQ_AMPDU) ? " AMPDU" : "",
>>> + txqi->flags & (1 << IEEE80211_TXQ_NO_AMSDU) ? " NO-AMSDU"
>>> : "");
>>
>> consider BIT() instead as a cleanup? :)
>>
>> (or maybe this is just a leftover from merging some other patches?)
>
> Yeah, this is a merging artifact; Rajkumar's patch added another flag,
> that I removed again. Didn't notice that there was still a whitespace
> change in this patch...
>
I added the flag based on our last discussion. The driver needs to check
txq status for each tx_dequeue(). One time txq check is not sufficient
as it allows the driver to dequeue all frames from txq.
drv_func() {
while (ieee80211_airtime_may_transmit(txq) &&
hw_has_space() &&
(pkt = ieee80211_tx_dequeue(hw, txq)))
push_to_hw(pkt);
}
>>> +bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
>>> + struct ieee80211_txq *txq)
>>> +{
>>> + struct ieee80211_local *local = hw_to_local(hw);
>>> + struct txq_info *txqi = to_txq_info(txq);
>>> + bool may_tx = false;
>>> +
>>> + spin_lock_bh(&local->active_txq_lock);
>>> +
>>> + if (ieee80211_txq_check_deficit(local, txqi)) {
>>> + may_tx = true;
>>> + list_del_init(&txqi->schedule_order);
>>
To handle above case, may_transmit should remove the node only
when it is in list.
if (list_empty(&txqi->schedule_order))
list_del_init(&txqi->schedule_order);
So that it can be used to determine whether txq is running negative.
-Rajkumar
next prev parent reply other threads:[~2018-09-12 0:07 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 22:22 [Make-wifi-fast] [PATCH RFC v3 0/4] Move TXQ scheduling into mac80211 Toke Høiland-Jørgensen
2018-09-07 22:22 ` [Make-wifi-fast] [PATCH RFC v3 2/4] mac80211: Add airtime accounting and scheduling to TXQs Toke Høiland-Jørgensen
2018-09-10 8:18 ` Johannes Berg
2018-09-10 11:13 ` Toke Høiland-Jørgensen
2018-09-10 11:22 ` Johannes Berg
2018-09-12 0:07 ` Rajkumar Manoharan [this message]
2018-09-12 11:10 ` Toke Høiland-Jørgensen
2018-09-12 16:23 ` Rajkumar Manoharan
2018-09-07 22:22 ` [Make-wifi-fast] [PATCH RFC v3 1/4] mac80211: Add TXQ scheduling API Toke Høiland-Jørgensen
2018-09-10 7:48 ` Johannes Berg
2018-09-10 10:57 ` Toke Høiland-Jørgensen
2018-09-10 11:03 ` Johannes Berg
2018-09-10 12:39 ` Toke Høiland-Jørgensen
2018-09-10 12:46 ` Johannes Berg
2018-09-10 13:08 ` Toke Høiland-Jørgensen
2018-09-10 13:10 ` Johannes Berg
2018-09-10 13:18 ` Toke Høiland-Jørgensen
2018-09-10 14:51 ` Johannes Berg
2018-09-10 15:00 ` Toke Høiland-Jørgensen
2018-09-11 9:20 ` Johannes Berg
2018-09-11 9:48 ` Toke Høiland-Jørgensen
2018-09-10 8:04 ` Johannes Berg
2018-09-10 11:02 ` Toke Høiland-Jørgensen
2018-09-10 11:12 ` Johannes Berg
2018-09-07 22:22 ` [Make-wifi-fast] [PATCH RFC v3 4/4] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs Toke Høiland-Jørgensen
2018-09-07 22:22 ` [Make-wifi-fast] [PATCH RFC v3 3/4] cfg80211: Add airtime statistics and settings Toke Høiland-Jørgensen
2018-09-10 8:23 ` Johannes Berg
2018-09-10 11:15 ` Toke Høiland-Jørgensen
2018-09-09 22:08 ` [Make-wifi-fast] [PATCH RFC v3 0/4] Move TXQ scheduling into mac80211 Kan Yan
2018-09-10 10:52 ` Toke Høiland-Jørgensen
2018-09-10 7:46 ` Johannes Berg
2018-09-10 11:16 ` Toke Høiland-Jørgensen
2018-09-10 11:24 ` Johannes Berg
2018-09-10 7:52 ` Johannes Berg
2018-09-10 11:17 ` Toke Høiland-Jørgensen
2018-09-10 11:26 ` Johannes Berg
2018-09-13 4:10 ` Kan Yan
2018-09-13 9:25 ` 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=e90d3540e3c92c6e894217982cd77ff1@codeaurora.org \
--to=rmanohar@codeaurora.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=make-wifi-fast@lists.bufferbloat.net \
--cc=nbd@nbd.name \
--cc=toke@toke.dk \
/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