Lets make wifi fast again!
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Adrian Chadd <adrian@freebsd.org>,
	make-wifi-fast@lists.bufferbloat.net,
	ath9k-devel <ath9k-devel@lists.ath9k.org>,
	"linux-wireless\@vger.kernel.org"
	<linux-wireless@vger.kernel.org>
Subject: Re: [Make-wifi-fast] [RFC/RFT 5/5] ath9k: Count RX airtime in airtime	deficit
Date: Fri, 10 Jun 2016 11:49:25 +0200	[thread overview]
Message-ID: <8737oll6fu.fsf@toke.dk> (raw)
In-Reply-To: <CA+BoTQmX0ULwRzHNjm83-_GbAQDMXgSsQgvBvm=4Bq3ozLOwjA@mail.gmail.com> (Michal Kazior's message of "Fri, 10 Jun 2016 11:20:14 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> On 10 June 2016 at 11:08, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> For A-MPDU all MPDU rx status (except last one) should share the same
>>> timestamp. Last one has a different one so all you need is to
>>> distinguish first and last MPDU. Non A-MPDU obviously are special case
>>> (status bits are pricky).
>>
>> Right. So comparing the rs_stamp between first and last MPDU should give
>> the duration of the entire thing?
>
> Depends on how you define your "thing" :) I no, I don't know what
> you'll actually measure. It should be reasonable either way.

"Time spent receiving from this station" is the overall metric I want.
In this case that then becomes "Time spend receiving this aggregate"
which I can then account to that stations' total RX airtime.

>> This would require keeping state between subsequent calls to the RX
>> handler. Also, what happens if the last MPDU is lost?
>
> No idea. If that's possible, then track last MPDU within PPDU, so you
> can at least fallback to _something_ when you detect a new first
> (A-)MPDU?
>
> Or maybe it's impossible (i.e. not worth worrying) and HW always
> reports last MPDU as far as status bits are concerned (regardless of
> it being _actual_ last MPDU, i.e. it just says "ok, I'm done with this
> PPDU").

I'll try a couple of different permutations of this and see what works.
Thanks for the ideas!

>>> No idea. Maybe it is as there's distinction between "more" and
>>> "moreaggr".
>>
>> Hmm. If it is, comparing the stamp of the first MPDU to the current time
>> (when handling it) should give the needed duration? Will try doing that
>> and see what the result is.
>
> I'd say it's a little racy/inaccurate (and perhaps unreliable) to
> compare any kind of global timer and compare it against your rx-status
> descriptors.

Well, the timer would be the one coming from the card (tsf in the code
snippet I posted comes from ath9k_hw_gettsf64()). But yeah, it is going
to account some things that are not *strictly* air time (interrupt
latency for one). However, the question is how much this really
contributes (at least in cases where we are not running behind because
of lack of CPU). And if there's a constant overhead it shouldn't matter
so much as long as it is the same for all stations. Certainly just
timestamping packets with the current time works well enough in the
qdisc layer...

-Toke

  reply	other threads:[~2016-06-10  9:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 16:51 [Make-wifi-fast] [RFC/RFT 0/5] Adding an airtime fairness scheduler to ath9k Toke Høiland-Jørgensen
2016-06-03 16:51 ` [Make-wifi-fast] [RFC/RFT 1/5] mac80211: skip netdev queue control with software queuing Toke Høiland-Jørgensen
2016-06-06  2:26   ` Julian Calaby
2016-06-06 17:00     ` Toke Høiland-Jørgensen
2016-06-03 16:51 ` [Make-wifi-fast] [RFC/RFT 2/5] ath9k: use mac80211 intermediate software queues Toke Høiland-Jørgensen
2016-06-03 16:51 ` [Make-wifi-fast] [RFC/RFT 3/5] ath9k: Add airstame stats to per-station debugfs Toke Høiland-Jørgensen
2016-06-03 16:51 ` [Make-wifi-fast] [RFC/RFT 4/5] ath9k: Add a per-station airtime deficit scheduler Toke Høiland-Jørgensen
2016-06-03 16:51 ` [Make-wifi-fast] [RFC/RFT 5/5] ath9k: Count RX airtime in airtime deficit Toke Høiland-Jørgensen
2016-06-04 17:06   ` Adrian Chadd
2016-06-05 10:55     ` Toke Høiland-Jørgensen
2016-06-05 17:23       ` Adrian Chadd
2016-06-07  0:01         ` Adrian Chadd
2016-06-07  1:31           ` Jonathan Morton
2016-06-07  8:58           ` Toke Høiland-Jørgensen
2016-06-07 11:12             ` Toke Høiland-Jørgensen
2016-06-08  1:41               ` Adrian Chadd
2016-06-08 13:06                 ` Toke Høiland-Jørgensen
2016-06-10  8:40               ` Michal Kazior
2016-06-10  8:53                 ` Toke Høiland-Jørgensen
2016-06-10  9:02                   ` Michal Kazior
2016-06-10  9:08                     ` Toke Høiland-Jørgensen
2016-06-10  9:20                       ` Michal Kazior
2016-06-10  9:49                         ` Toke Høiland-Jørgensen [this message]
2016-06-10 15:33                           ` Toke Høiland-Jørgensen
2016-06-10 15:52                             ` Adrian Chadd
2016-06-04 15:24 ` [Make-wifi-fast] [RFC/RFT 0/5] Adding an airtime fairness scheduler to ath9k Luca Muscariello
2016-06-05 10:51   ` Toke Høiland-Jørgensen
2016-06-05 11:40     ` Luca Muscariello

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

  List information: https://lists.bufferbloat.net/postorius/lists/make-wifi-fast.lists.bufferbloat.net/

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

  git send-email \
    --in-reply-to=8737oll6fu.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=adrian@freebsd.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=michal.kazior@tieto.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