All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Andrew McGregor <andrewmcgr@google.com>
Subject: Re: [PATCH 9/9] mac80211: rc80211_minstrel: remove variance / stddev calculation
Date: Sat, 6 Oct 2018 11:23:34 -0700	[thread overview]
Message-ID: <CAA93jw5T40FP0O8dHbS5r2QLpYVDbF9B6NHrc48jceBubENC6w@mail.gmail.com> (raw)
In-Reply-To: <43da677d-60b8-b940-4d89-d27578f9c20b@nbd.name>

On Sat, Oct 6, 2018 at 11:18 AM Felix Fietkau <nbd@nbd.name> wrote:
>
> On 2018-10-06 19:59, Dave Taht wrote:
> > On Sat, Oct 6, 2018 at 10:37 AM Felix Fietkau <nbd@nbd.name> wrote:
> >>
> >> When there are few packets (e.g. for sampling attempts), the exponentially
> >> weighted variance is usually vastly overestimated, making the resulting data
> >> essentially useless. As far as I know, there has not been any practical use
> >> for this, so let's not waste any cycles on it.
> >>
> >> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> >> ---
> >>  net/mac80211/rc80211_minstrel.c            |  6 -----
> >>  net/mac80211/rc80211_minstrel.h            | 26 +---------------------
> >>  net/mac80211/rc80211_minstrel_debugfs.c    | 14 ++++--------
> >>  net/mac80211/rc80211_minstrel_ht_debugfs.c | 14 ++++--------
> >>  4 files changed, 9 insertions(+), 51 deletions(-)
> >>
> >> diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
> >> index dead57ba9eac..a34e9c2ca626 100644
> >> --- a/net/mac80211/rc80211_minstrel.c
> >> +++ b/net/mac80211/rc80211_minstrel.c
> >> @@ -167,12 +167,6 @@ minstrel_calc_rate_stats(struct minstrel_rate_stats *mrs)
> >>                 if (unlikely(!mrs->att_hist)) {
> >>                         mrs->prob_ewma = cur_prob;
> >>                 } else {
> >> -                       /* update exponential weighted moving variance */
> >> -                       mrs->prob_ewmv = minstrel_ewmv(mrs->prob_ewmv,
> >> -                                                       cur_prob,
> >> -                                                       mrs->prob_ewma,
> >> -                                                       EWMA_LEVEL);
> >> -
> >>                         /*update exponential weighted moving avarage */
> >>                         mrs->prob_ewma = minstrel_ewma(mrs->prob_ewma,
> >>                                                        cur_prob,
> >> diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
> >> index 54b2b2c3e10a..23ec953e3a24 100644
> >> --- a/net/mac80211/rc80211_minstrel.h
> >> +++ b/net/mac80211/rc80211_minstrel.h
> >> @@ -35,19 +35,6 @@ minstrel_ewma(int old, int new, int weight)
> >>         return old + incr;
> >>  }
> >>
> >> -/*
> >> - * Perform EWMV (Exponentially Weighted Moving Variance) calculation
> >> - */
> >
> > I worry about this one. where are you getting your proof from?
> I've done quite a few measurements myself to see if this can be usable
> for further rate control improvements or for the upcoming TPC work.
> The data this generates simply fluctuates wildly and incoherently based
> on the sampling behavior, making it completely useless.
> Together with Thomas (who introduced this code), I tried a few times to
> fix this, but couldn't find any way to make it coherent and usable.
>
> Thomas and I both agreed that it's better to just remove it until
> somebody has a better idea what to do.
>
> Also, this was only used for debugfs statistics, not for any actual rate
> control behavior.

OK, thanks. I'm totally delighted to see this patchset otherwise.

> - Felix



-- 

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

      reply	other threads:[~2018-10-06 18:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06 17:34 [PATCH 1/9] mac80211: minstrel: Enable STBC and LDPC for VHT Rates Felix Fietkau
2018-10-06 17:35 ` [PATCH 2/9] mac80211: minstrel: remove unnecessary debugfs cleanup code Felix Fietkau
2018-10-06 17:35 ` [PATCH 3/9] mac80211: minstrel: merge with minstrel_ht, always enable VHT support Felix Fietkau
2018-10-06 17:35 ` [PATCH 4/9] mac80211: minstrel: reduce minstrel_mcs_groups size Felix Fietkau
2018-10-06 17:35 ` [PATCH 5/9] mac80211: minstrel: fix using short preamble CCK rates on HT clients Felix Fietkau
2018-10-06 17:35 ` [PATCH 6/9] mac80211: minstrel: fix CCK rate group streams value Felix Fietkau
2018-10-06 17:35 ` [PATCH 7/9] mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode Felix Fietkau
2018-10-06 17:35 ` [PATCH 8/9] mac80211: minstrel: do not sample rates 3 times slower than max_prob_rate Felix Fietkau
2018-10-06 17:35 ` [PATCH 9/9] mac80211: rc80211_minstrel: remove variance / stddev calculation Felix Fietkau
2018-10-06 17:59   ` Dave Taht
2018-10-06 18:18     ` Felix Fietkau
2018-10-06 18:23       ` 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=CAA93jw5T40FP0O8dHbS5r2QLpYVDbF9B6NHrc48jceBubENC6w@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=andrewmcgr@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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.