From: Yibo Zhao <yiboz@codeaurora.org>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
linux-wireless-owner@vger.kernel.org
Subject: Re: [PATCH V3 4/4] mac80211: Sync airtime weight sum with per AC synced sta airtime weight together
Date: Tue, 24 Sep 2019 11:19:33 +0800 [thread overview]
Message-ID: <ffe79f35d4dcb50aa31dc04035855f79@codeaurora.org> (raw)
In-Reply-To: <87blvb5lb9.fsf@toke.dk>
On 2019-09-23 19:00, Toke Høiland-Jørgensen wrote:
>> - if (params->airtime_weight)
>> - sta->airtime_weight = params->airtime_weight;
>> + if (params->airtime_weight &&
>> + params->airtime_weight != sta->airtime_weight) {
>
> This check doesn't work I think? You're not using the array-based
> sta->airtime_weight[], and there are locking issues by just checking
> like this; so maybe just keep the if() on params->airtime_weight, and
> do
> the checking inside the loop while holding the lock?
It should be array-based sta->airtime_weight[] and I am missing that
part during the porting. But you are right about we should check it
inside the loop with the lock.
>
> Or could we just turn the weights into atomics to avoid the locking
> entirely?
Actually, we still need the active txq locking to make sure the txq is
on the rbtree. Otherwise, no need to change airtime weight sum.
>
>> + for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
>> + spin_lock_bh(&local->active_txq_lock[ac]);
>> + for (tid = 0; tid < IEEE80211_NUM_TIDS + 1; tid++) {
>> + if (!sta->sta.txq[tid] ||
>> + ac != ieee80211_ac_from_tid(tid))
>> + continue;
>> +
>> + pre_weight = sta->airtime_weight[ac];
>> + sta->airtime_weight[ac] =
>> + params->airtime_weight;
>> +
>> + txqi = to_txq_info(sta->sta.txq[tid]);
>> + if (RB_EMPTY_NODE(&txqi->schedule_order))
>> + continue;
>> +
>> + local->airtime_weight_sum[ac] = local->airtime_weight_sum[ac] +
>> + params->airtime_weight -
>> + pre_weight;
>> + }
>> + spin_unlock_bh(&local->active_txq_lock[ac]);
>> + }
>> + }
>>
--
Yibo
next prev parent reply other threads:[~2019-09-24 3:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 7:19 [PATCH V3 0/4] Enable virtual time-based airtime scheduler support on ath10k Yibo Zhao
2019-09-23 7:19 ` [PATCH V3 1/4] mac80211: Switch to a virtual time-based airtime scheduler Yibo Zhao
2019-09-23 7:19 ` [PATCH V3 2/4] mac80211: defer txqs removal from rbtree Yibo Zhao
2019-09-23 10:56 ` Toke Høiland-Jørgensen
2019-09-24 2:55 ` Yibo Zhao
2019-09-23 7:20 ` [PATCH V3 3/4] mac80211: fix low throughput in multi-clients situation Yibo Zhao
2019-09-23 10:55 ` Toke Høiland-Jørgensen
2019-09-24 8:22 ` Yibo Zhao
2019-09-24 8:48 ` Toke Høiland-Jørgensen
2019-09-24 8:58 ` Yibo Zhao
2019-09-23 7:20 ` [PATCH V3 4/4] mac80211: Sync airtime weight sum with per AC synced sta airtime weight together Yibo Zhao
2019-09-23 11:00 ` Toke Høiland-Jørgensen
2019-09-24 3:19 ` Yibo Zhao [this message]
2019-09-24 7:27 ` Toke Høiland-Jørgensen
2019-10-01 10:19 ` [PATCH V3 0/4] Enable virtual time-based airtime scheduler support on ath10k Johannes Berg
2019-10-01 10:59 ` Yibo Zhao
2019-10-01 11:05 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ffe79f35d4dcb50aa31dc04035855f79@codeaurora.org \
--to=yiboz@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless-owner@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).