[ath9k-devel] [Make-wifi-fast] [RFC] ath9k: Measure per-station airtime usage

Michal Kazior <[email protected]>
Newsgroups org.ath9k.lists.ath9k-devel,org.kernel.vger.linux-wireless
Message-ID <CA+BoTQnzaE0hF7ja+BCT6-_WuMgG+e_Ln_G7PWh5TwHJ2ixVFA@mail.gmail.com>
On 26 May 2016 at 15:50, Toke H?iland-J?rgensen <[email protected]> wrote:
> This is my attempt to add per-station airtime usage accounting to ath9k.
> For now I just export it to a new debugfs entry, but my plan is to use
> it to make (station) scheduling decisions. However, before attempting
> that I would like some feedback from someone more familiar with the
> ath9k than me as to whether this way of measuring airtime usage is
> likely to give reasonable results.
>
> I realise that there's probably some things I'm missing, but an initial
> test run indicates that the values are at least in the right ballpark (I
> get a total of ~170k usecs of measured airtime per 200 ms sampling
> interval when running three simultaneous TCP streams to three different
> stations).
>
> So can anyone comment on whether I'm on the right track here? And
> possibly provide some more detail as to what I'm missing and how to
> remedy that?
[...]
>
> +void ath_debug_tx_airtime(struct ath_softc *sc,
> +                         struct ath_node *an,
> +                         struct ath_tx_status *ts)
> +{
> +       struct ath_airtime_stats *astats;
> +
> +       rcu_read_lock();
> +
> +       astats = &an->airtime_stats;
> +       astats->tx_airtime += ts->duration;

I'm not ath9k expert but this seems to be oblivious to tx retries. The
ts->duration is acquired from the last used tx rate for given frame.
Or am I missing something?

I think you should use ts->ts_rateindex and ts->ts_longretry to factor
in retries (see ath_tx_rc_status).


Micha?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.