All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Kan Yan <kyan@google.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 v3 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue
Date: Sat, 19 Oct 2019 13:12:55 +0200	[thread overview]
Message-ID: <87o8ydc7k8.fsf@toke.dk> (raw)
In-Reply-To: <CA+iem5sCTsPe4PW=0j20NoAratvdCvB0ss7zO3wMWLcirXsLgg@mail.gmail.com>

Kan Yan <kyan@google.com> writes:

>> +       if (local->airtime_flags & AIRTIME_USE_AQL) {
>> +               airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta,
>> +                                                            skb->len);
>> +               if (airtime) {
>> +                       /* We only have 10 bits in tx_time_est, so store airtime
>> +                        * in increments of 4 us and clamp that to 2**10.
>> +                        */
>> +                       info->tx_time_est = min_t(u32, airtime >> 2, 1 << 10);
>> +                       ieee80211_sta_update_pending_airtime(local, tx.sta, ac,
>> +                                                            airtime, false);
>> +               }
>> +       }
>> +
>
> It should be:
>                          ieee80211_sta_update_pending_airtime(local, tx.sta, ac,
>
> info->tx_time_est << 2, false);
>
> The airtime rounded to 4us (info->tx_time_est << 2), instead of the
> original airtime should be used when registering the pending airtime,
> to keep it consistent with airtime subtracted when the skb is freed.

Yes, I realised that last night as well. The rounding is also off (max
is 2**10-1, not 2**10. Will send a v4 :)

-Toke


WARNING: multiple messages have this Message-ID
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Kan Yan <kyan@google.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 v3 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue
Date: Sat, 19 Oct 2019 13:12:55 +0200	[thread overview]
Message-ID: <87o8ydc7k8.fsf@toke.dk> (raw)
In-Reply-To: <CA+iem5sCTsPe4PW=0j20NoAratvdCvB0ss7zO3wMWLcirXsLgg@mail.gmail.com>

Kan Yan <kyan@google.com> writes:

>> +       if (local->airtime_flags & AIRTIME_USE_AQL) {
>> +               airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta,
>> +                                                            skb->len);
>> +               if (airtime) {
>> +                       /* We only have 10 bits in tx_time_est, so store airtime
>> +                        * in increments of 4 us and clamp that to 2**10.
>> +                        */
>> +                       info->tx_time_est = min_t(u32, airtime >> 2, 1 << 10);
>> +                       ieee80211_sta_update_pending_airtime(local, tx.sta, ac,
>> +                                                            airtime, false);
>> +               }
>> +       }
>> +
>
> It should be:
>                          ieee80211_sta_update_pending_airtime(local, tx.sta, ac,
>
> info->tx_time_est << 2, false);
>
> The airtime rounded to 4us (info->tx_time_est << 2), instead of the
> original airtime should be used when registering the pending airtime,
> to keep it consistent with airtime subtracted when the skb is freed.

Yes, I realised that last night as well. The rounding is also off (max
is 2**10-1, not 2**10. Will send a v4 :)

-Toke


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

  reply	other threads:[~2019-10-19 11:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 14:40 [PATCH v3 0/4] Add Airtime Queue Limits (AQL) to mac80211 Toke Høiland-Jørgensen
2019-10-18 14:40 ` Toke Høiland-Jørgensen
2019-10-18 14:40 ` [PATCH v3 1/4] mac80211: Shrink the size of ack_frame_id to make room for tx_time_est Toke Høiland-Jørgensen
2019-10-18 14:40   ` Toke Høiland-Jørgensen
2019-10-18 14:40 ` [PATCH v3 2/4] mac80211: Import airtime calculation code from mt76 Toke Høiland-Jørgensen
2019-10-18 14:40   ` Toke Høiland-Jørgensen
2019-10-18 14:40 ` [PATCH v3 3/4] mac80211: Implement Airtime-based Queue Limit (AQL) Toke Høiland-Jørgensen
2019-10-18 14:40   ` Toke Høiland-Jørgensen
2019-10-18 14:40 ` [PATCH v3 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue Toke Høiland-Jørgensen
2019-10-18 14:40   ` Toke Høiland-Jørgensen
2019-10-18 21:25   ` Kan Yan
2019-10-18 21:25     ` Kan Yan
2019-10-19 11:12     ` Toke Høiland-Jørgensen [this message]
2019-10-19 11:12       ` 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=87o8ydc7k8.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=john@phrozen.org \
    --cc=kevinhayes@google.com \
    --cc=kyan@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 \
    --subject='Re: [PATCH v3 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.