All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kan Yan <kyan@google.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org,
	Make-Wifi-fast <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 v4 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue
Date: Wed, 23 Oct 2019 08:43:03 -0700	[thread overview]
Message-ID: <CA+iem5tbSFyY0pS5Ufb8Ch=y3UGR_iuX_8ao9=2iS05-MozQwA@mail.gmail.com> (raw)
In-Reply-To: <87lftbn60t.fsf@toke.dk>

> Aha! Turns out I was doing the sta lookup completely wrong in
> ieee80211_report_used_skb(); so anything frames that were dropped and
> went through there would not get its airtime subtracted correctly. Will
> send a v6 with a fix :)

Awesome, thanks! That looks very promising.  The symptom I see with
previous patch is the interface's pending airtime count looks fine,
but the station's airtime get wrong, either due to airtime is credited
to the wrong station or wrong AC.

On Wed, Oct 23, 2019 at 2:52 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>
> > Kan Yan <kyan@google.com> writes:
> >
> >>> >> +               if (ieee80211_is_data_qos(hdr->frame_control)) {
> >>> >> +                       qc = ieee80211_get_qos_ctl(hdr);
> >>> >> +                       tid = qc[0] & 0xf;
> >>> >> +                       ac = ieee80211_ac_from_tid(tid);
> >>> >> +               } else {
> >>> >> +                       ac = IEEE80211_AC_BE;
> >>> >> +               }
> >>> >
> >>> > The tid/ac is incorrect either here or in __ieee80211_tx_status() when
> >>> > tested with ath10k. The ac is set to AC_BE with test done using BK
> >>> > class traffic, hence the pending airtime get updated for the wrong
> >>> > txq.
> >>>
> >>> Huh, well that won't do, obviously :)
> >>>
> >>> Any idea why it might be wrong?
> >>
> >> somehow  ieee80211_is_data_qos() returns false. Besides,  qos_control
> >> field doesn't seems to be set in ieee80211_build_hdr().
> >>
> >>> Hmm, I guess we could just get the ac using skb_get_queue_mapping().
> >>> I'll send an update with this fixed for you to try :)
> >> Thanks for the quick update. It is getting much better, but
> >> unfortunately the pending airtime accounting sometimes is still not
> >> correct and cause txq stuck occasionally.
> >
> > OK, so that has to mean that there are packets getting dropped somewhere
> > without going through ieee80211_report_used_skb(). Assuming you're not
> > hitting the underflow warnings, just seeing the counter not get back
> > down to zero?
> >
> > Could you see if you can find out if ath10k does that anywhere? I'll go
> > hunting in mac80211.
> >
> > Looking for calls to kfree_skb() or kfree_skb_list() should hopefully
> > turn up something...
>
> Aha! Turns out I was doing the sta lookup completely wrong in
> ieee80211_report_used_skb(); so anything frames that were dropped and
> went through there would not get its airtime subtracted correctly. Will
> send a v6 with a fix :)
>
> -Toke
>

WARNING: multiple messages have this Message-ID
From: Kan Yan <kyan@google.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Rajkumar Manoharan <rmanohar@codeaurora.org>,
	Kevin Hayes <kevinhayes@google.com>,
	Make-Wifi-fast <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 v4 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue
Date: Wed, 23 Oct 2019 08:43:03 -0700	[thread overview]
Message-ID: <CA+iem5tbSFyY0pS5Ufb8Ch=y3UGR_iuX_8ao9=2iS05-MozQwA@mail.gmail.com> (raw)
In-Reply-To: <87lftbn60t.fsf@toke.dk>

> Aha! Turns out I was doing the sta lookup completely wrong in
> ieee80211_report_used_skb(); so anything frames that were dropped and
> went through there would not get its airtime subtracted correctly. Will
> send a v6 with a fix :)

Awesome, thanks! That looks very promising.  The symptom I see with
previous patch is the interface's pending airtime count looks fine,
but the station's airtime get wrong, either due to airtime is credited
to the wrong station or wrong AC.

On Wed, Oct 23, 2019 at 2:52 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>
> > Kan Yan <kyan@google.com> writes:
> >
> >>> >> +               if (ieee80211_is_data_qos(hdr->frame_control)) {
> >>> >> +                       qc = ieee80211_get_qos_ctl(hdr);
> >>> >> +                       tid = qc[0] & 0xf;
> >>> >> +                       ac = ieee80211_ac_from_tid(tid);
> >>> >> +               } else {
> >>> >> +                       ac = IEEE80211_AC_BE;
> >>> >> +               }
> >>> >
> >>> > The tid/ac is incorrect either here or in __ieee80211_tx_status() when
> >>> > tested with ath10k. The ac is set to AC_BE with test done using BK
> >>> > class traffic, hence the pending airtime get updated for the wrong
> >>> > txq.
> >>>
> >>> Huh, well that won't do, obviously :)
> >>>
> >>> Any idea why it might be wrong?
> >>
> >> somehow  ieee80211_is_data_qos() returns false. Besides,  qos_control
> >> field doesn't seems to be set in ieee80211_build_hdr().
> >>
> >>> Hmm, I guess we could just get the ac using skb_get_queue_mapping().
> >>> I'll send an update with this fixed for you to try :)
> >> Thanks for the quick update. It is getting much better, but
> >> unfortunately the pending airtime accounting sometimes is still not
> >> correct and cause txq stuck occasionally.
> >
> > OK, so that has to mean that there are packets getting dropped somewhere
> > without going through ieee80211_report_used_skb(). Assuming you're not
> > hitting the underflow warnings, just seeing the counter not get back
> > down to zero?
> >
> > Could you see if you can find out if ath10k does that anywhere? I'll go
> > hunting in mac80211.
> >
> > Looking for calls to kfree_skb() or kfree_skb_list() should hopefully
> > turn up something...
>
> Aha! Turns out I was doing the sta lookup completely wrong in
> ieee80211_report_used_skb(); so anything frames that were dropped and
> went through there would not get its airtime subtracted correctly. Will
> send a v6 with a fix :)
>
> -Toke
>

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2019-10-23 15:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 11:37 [PATCH v4 0/4] Add Airtime Queue Limits (AQL) to mac80211 Toke Høiland-Jørgensen
2019-10-19 11:37 ` Toke Høiland-Jørgensen
2019-10-19 11:37 ` [PATCH v4 1/4] mac80211: Shrink the size of ack_frame_id to make room for tx_time_est Toke Høiland-Jørgensen
2019-10-19 11:37   ` Toke Høiland-Jørgensen
2019-10-19 11:37 ` [PATCH v4 2/4] mac80211: Import airtime calculation code from mt76 Toke Høiland-Jørgensen
2019-10-19 11:37   ` Toke Høiland-Jørgensen
2019-10-21 22:14   ` kbuild test robot
2019-10-21 22:14     ` kbuild test robot
2019-10-21 22:14   ` [RFC PATCH] mac80211: ieee80211_calc_rx_airtime() can be static kbuild test robot
2019-10-21 22:14     ` kbuild test robot
2019-10-19 11:37 ` [PATCH v4 3/4] mac80211: Implement Airtime-based Queue Limit (AQL) Toke Høiland-Jørgensen
2019-10-19 11:37   ` Toke Høiland-Jørgensen
2019-10-19 11:37 ` [PATCH v4 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue Toke Høiland-Jørgensen
2019-10-19 11:37   ` Toke Høiland-Jørgensen
2019-10-22  6:20   ` Kan Yan
2019-10-22  6:20     ` Kan Yan
2019-10-22  7:14     ` Toke Høiland-Jørgensen
2019-10-22  7:14       ` Toke Høiland-Jørgensen
2019-10-22 11:35     ` Toke Høiland-Jørgensen
2019-10-22 11:35       ` Toke Høiland-Jørgensen
2019-10-23  6:41       ` Kan Yan
2019-10-23  6:41         ` Kan Yan
2019-10-23  8:18         ` Toke Høiland-Jørgensen
2019-10-23  8:18           ` Toke Høiland-Jørgensen
2019-10-23  9:52           ` Toke Høiland-Jørgensen
2019-10-23  9:52             ` Toke Høiland-Jørgensen
2019-10-23 15:43             ` Kan Yan [this message]
2019-10-23 15:43               ` Kan Yan
     [not found]             ` <CA+iem5vU-K-+sSSeNugy5ZZF_nH5vuaXW3J_WC=1WWhdkHOgjw@mail.gmail.com>
2019-10-23 21:09               ` Toke Høiland-Jørgensen
2019-10-23 21:09                 ` 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='CA+iem5tbSFyY0pS5Ufb8Ch=y3UGR_iuX_8ao9=2iS05-MozQwA@mail.gmail.com' \
    --to=kyan@google.com \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=john@phrozen.org \
    --cc=kevinhayes@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 \
    --cc=toke@redhat.com \
    --subject='Re: [PATCH v4 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue' \
    /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

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.