All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Rajkumar Manoharan <rmanohar@codeaurora.org>
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Kan Yan" <kyan@google.com>,
	Make-Wifi-fast <make-wifi-fast@lists.bufferbloat.net>,
	linux-wireless-owner@vger.kernel.org,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Felix Fietkau" <nbd@nbd.name>
Subject: Re: [Make-wifi-fast] [PATCH RFC v5 3/4] mac80211: Add airtime accounting and scheduling to TXQs
Date: Sat, 13 Oct 2018 00:09:58 -0700	[thread overview]
Message-ID: <CAA93jw4ufN0i+-RpsLqHyfOjWyf3KuqY-yt8oi-OM5AT8fXF4Q@mail.gmail.com> (raw)
In-Reply-To: <7dfcb7a13a3f75f01f7b88163f2c33d6@codeaurora.org>

On Fri, Oct 12, 2018 at 12:38 AM Rajkumar Manoharan
<rmanohar@codeaurora.org> wrote:
>
> 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?

I'll have some time in the coming weeks to be able to test this stuff.
I'm mostly interested
in algorithmic correctness more than the API changes...

Is there a version of these patches that is stable enough on ath9 or ath10k?

Do I foresee any issues? Jeeze, no, we *never* have any issues with wifi.

"fetch indication may pull ~4ms/8ms of packets from each tid"

made me really twitchy.
>
> #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
> _______________________________________________
> Make-wifi-fast mailing list
> Make-wifi-fast@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/make-wifi-fast



-- 

Dave Täht
CTO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-831-205-9740

      parent reply	other threads:[~2018-10-13  7:10 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
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             ` Dave Taht [this message]

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=CAA93jw4ufN0i+-RpsLqHyfOjWyf3KuqY-yt8oi-OM5AT8fXF4Q@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --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 \
    --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.