All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
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: [PATCH RFC v5 3/4] mac80211: Add airtime accounting and scheduling to TXQs
Date: Fri, 12 Oct 2018 00:38:48 -0700	[thread overview]
Message-ID: <7dfcb7a13a3f75f01f7b88163f2c33d6@codeaurora.org> (raw)
In-Reply-To: <87pnwg93at.fsf@toke.dk>

On 2018-10-11 03:38, Toke Høiland-Jørgensen wrote:
> Rajkumar Manoharan <rmanohar@codeaurora.org> writes:
> 
>> Hmm... mine is bit different. txqs are refilled only once for all 
>> txqs.
>> It will give more opportunity for non-served txqs. drv_wake_tx_queue
>> won't be
>> called from may_tx as the driver anyway will not push packets in
>> pull-mode.
> 
> So, as far as I can tell, this requires the hardware to "keep trying"?
> I.e., if it just stops scheduling a TXQ after may_transmit() returns
> false, there is no guarantee that that TXQ will ever get re-awoken
> unless a new packet arrives for it?
> 
That is true and even now ath10k operates the same way in pull mode. Not
just packet arrival, even napi poll routine tries to pushes the packets.
One more thing, fetch indication may pull ~4ms/8ms of packets from each 
tid.
This makes deficit too low and so refilling txqs by just airtime_weight 
becomes
cumbersome. In may_transmit, the deficit are incremented by 20 * 
airtime_weight.
In future this will be also replaced by station specific quantum. we can 
revisit
this once BQL in place. Performance issue is resolved by this approach.
Do you foresee any issues?


#define IEEE80211_TXQ_MAY_TX_QUANTUM  20
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);
         struct sta_info *sta;
         u8 ac = txq->ac;

         lockdep_assert_held(&local->active_txq_lock[ac]);

         if (!txqi->txq.sta)
                 goto out;

         sta = container_of(txqi->txq.sta, struct sta_info, sta);
         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);
         }

         return false;

  out:
         list_del_init(&txqi->schedule_order);
         return true;
}

-Rajkumar

  reply	other threads:[~2018-10-12  7:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 12:32 [PATCH RFC v5 0/4] Move TXQ scheduling and airtime fairness into mac80211 Toke Høiland-Jørgensen
2018-10-09 12:32 ` [PATCH RFC v5 2/4] cfg80211: Add airtime statistics and settings Toke Høiland-Jørgensen
2018-10-09 12:32 ` [PATCH RFC v5 1/4] mac80211: Add TXQ scheduling API Toke Høiland-Jørgensen
2018-10-09 12:32 ` [PATCH RFC v5 4/4] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs Toke Høiland-Jørgensen
2018-10-09 12:32 ` [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 [this message]
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
2018-10-13  7:09             ` [Make-wifi-fast] " 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dfcb7a13a3f75f01f7b88163f2c33d6@codeaurora.org \
    --to=rmanohar@codeaurora.org \
    --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=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 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.