From: Bruno Randolf <br1@einfach.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
Jouni Malinen <j@w1.fi>,
linville@tuxdriver.com, randy.dunlap@oracle.com,
peterz@infradead.org, blp@cs.stanford.edu,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Lars_Ericsson@telia.com, stefanr@s5r6.in-berlin.de,
kosaki.motohiro@jp.fujitsu.com, akpm@linux-foundation.org,
kevin.granade@gmail.com
Subject: Re: [PATCH v7 3/3] nl80211/mac80211: Report signal average
Date: Fri, 19 Nov 2010 17:49:31 +0900 [thread overview]
Message-ID: <201011191749.31974.br1@einfach.org> (raw)
In-Reply-To: <AANLkTimoogSLAipNy=njGtHypqBQSk=usDmXut=KN9TM@mail.gmail.com>
On Thu November 18 2010 08:11:18 Bob Copeland wrote:
> On Wed, Nov 17, 2010 at 11:16 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Wed, 2010-11-17 at 17:28 +0900, Bruno Randolf wrote:
> >> I understand that this could be more efficient, but if it matters or not
> >> - honestly, I don't know. Can a more knowledgeable person than me
> >> comment on this?
> >
> > Yes, it does matter -- think of an embedded MIPS board running at 500MHz
> > and trying to push 11n speeds.
OK, I have done tests with a 266MHz x86 board, pushing 30Mbps UDP thru it. It
can handle maximum around 18Mbps thuput in both cases, with and without the
average. And that is using the ewma function two times (ath5k beacons and
signal average). Here are the results of iperf -u -c IP -b 30M -t 120 (2min of
30Mbps UDP):
With average:
0.0-120.4 sec 269 MBytes 18.7 Mbits/sec 0.370 ms 114323/306094 (37%)
0.0-120.4 sec 263 MBytes 18.3 Mbits/sec 0.336 ms 118668/306110 (39%)
0.0-120.4 sec 265 MBytes 18.5 Mbits/sec 0.229 ms 117036/306120 (38%)
Without:
0.0-120.4 sec 267 MBytes 18.6 Mbits/sec 0.385 ms 115457/306123 (38%)
0.0-120.4 sec 267 MBytes 18.6 Mbits/sec 0.374 ms 115868/306063 (38%)
0.0-120.4 sec 261 MBytes 18.2 Mbits/sec 0.566 ms 119603/306112 (39%)
So I conclude that compared to all the other things we do when we receive a
packet having one division more or less does not have a huge performance
impact.
> I assume the number of samples (weight) is the more
> important tunable. One option is you can require factor
> to be a power of two that is much larger than weight,
> then at least you can store factor/weight precomputed
> and multiply by it instead of doing a divide in ewma_add.
> Then ewma_get can also just be a shift as well.
That's a good idea! I will try to improve the code.
bruno
next prev parent reply other threads:[~2010-11-19 8:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 3:00 [PATCH v7 0/3] Generic exponentially weighted moving average (EWMA) Bruno Randolf
2010-11-12 3:00 ` [PATCH v7 1/3] Add generic exponentially weighted moving average (EWMA) function Bruno Randolf
2010-11-12 3:00 ` [PATCH v7 2/3] ath5k: Use generic EWMA library Bruno Randolf
2010-11-12 3:00 ` [PATCH v7 3/3] nl80211/mac80211: Report signal average Bruno Randolf
2010-11-16 9:37 ` Jouni Malinen
2010-11-17 8:28 ` Bruno Randolf
2010-11-17 16:16 ` Johannes Berg
2010-11-17 23:11 ` Bob Copeland
2010-11-19 8:49 ` Bruno Randolf [this message]
2010-11-19 14:04 ` Stefan Richter
2010-11-22 2:41 ` Bruno Randolf
2010-11-22 7:26 ` Stefan Richter
2010-11-19 17:52 ` Johannes Berg
2010-11-22 2:36 ` Bruno Randolf
2010-11-19 9:07 ` Bruno Randolf
2010-11-19 12:16 ` Peter Zijlstra
2010-11-19 22:28 ` Bob Copeland
2010-11-19 23:01 ` Peter Zijlstra
2010-12-02 8:12 ` Bruno Randolf
2010-11-19 18:58 ` Johannes Berg
2010-11-22 18:46 ` John W. Linville
2010-11-20 16:45 ` Brian Prodoehl
2010-11-24 16:24 ` Johannes Berg
2010-11-24 19:05 ` Ben Greear
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=201011191749.31974.br1@einfach.org \
--to=br1@einfach.org \
--cc=Lars_Ericsson@telia.com \
--cc=akpm@linux-foundation.org \
--cc=blp@cs.stanford.edu \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=kevin.granade@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=me@bobcopeland.com \
--cc=peterz@infradead.org \
--cc=randy.dunlap@oracle.com \
--cc=stefanr@s5r6.in-berlin.de \
/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;
as well as URLs for NNTP newsgroup(s).