From: Felix Fietkau <nbd@openwrt.org>
To: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
lrodriguez@atheros.com, br1@einfach.org
Subject: Re: [PATCH 1/3] cfg80211: add channel utilization stats to the survey command
Date: Sat, 09 Oct 2010 18:32:55 +0200 [thread overview]
Message-ID: <4CB09937.7040001@openwrt.org> (raw)
In-Reply-To: <201010091737.17000.helmut.schaa@googlemail.com>
On 2010-10-09 5:37 PM, Helmut Schaa wrote:
> Am Samstag 09 Oktober 2010 schrieb Felix Fietkau:
>> On 2010-10-09 2:17 PM, Helmut Schaa wrote:
>> > Am Samstag 09 Oktober 2010 schrieb Felix Fietkau:
>> >> Using these, user space can calculate a relative channel utilization
>> >> with arbitrary intervals by regularly taking snapshots of the survey
>> >> results.
>> >
>> > What if you've got multiple consumers, wouldn't that mess up the
>> > survey results?
>> >
>> > I mean, for example mac80211 and/or hostapd might want to use the busy time
>> > statistics for the BSS load IE while a different userspace process might
>> > want to monitor the channel utilization in order to detect a worsening
>> > channel condition.
>> >
>> > If the consumers happen to use the same interval and request the survey
>> > very soon after each other one consumer will get the values on a nice (close
>> > to the query interval) time base while the other one will get the values
>> > based on a very small interval (which might lower the value's
>> > representativeness).
>> Multiple consumers work just fine, since the survey results are relative
>> to the time the hardware started using the channel, not relative to the
>> last request. Maybe my description was a bit unclear on that part.
>
> Ah, thanks Felix, I only read the comment, not the code :)
>
> So, the busy time statistics for channel i are gathered starting with the
> switch to i. Hence, if a user space process would like to measure multiple
> channels it will just switch through all of them and call get survey right
> before switching to the next one, right?
In the current ath9k implementation that I posted, the stats are reset
immediately when switching to a channel, with one exception: switching
back to the operating channel after off-channel activity. That way, you
get sane, readable stats for all channels when dumping the survey list
after a scan.
> However, if we think about the BSS load IE we might want to measure the busy
> times without switching the channel? But we'd like have a somewhat actual
> value and not an average throughout the last minute/hour or so. Any ideas how
> to integrate that into your approach?
Just grab a survey dump when starting up, then another after a
minute/hour, and subtract the values of the last one.
Right now there's still an overflow issue in the internal counters in
the current ath9k implementation, so the stats are off unless you poll
survey stats regularly. I'll send a fix for that later.
- Felix
next prev parent reply other threads:[~2010-10-09 16:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 0:39 [PATCH 1/3] cfg80211: add channel utilization stats to the survey command Felix Fietkau
2010-10-09 0:39 ` [PATCH 2/3] ath9k: add compile time checking for the size of the channel list Felix Fietkau
2010-10-09 0:39 ` [PATCH 3/3] ath9k: implement channel utilization stats for survey Felix Fietkau
2010-10-10 16:21 ` [PATCH v2 " Felix Fietkau
2010-10-09 12:17 ` [PATCH 1/3] cfg80211: add channel utilization stats to the survey command Helmut Schaa
2010-10-09 13:08 ` Felix Fietkau
2010-10-09 15:37 ` Helmut Schaa
2010-10-09 16:32 ` Felix Fietkau [this message]
2010-10-09 18:45 ` Helmut Schaa
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=4CB09937.7040001@openwrt.org \
--to=nbd@openwrt.org \
--cc=br1@einfach.org \
--cc=helmut.schaa@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.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;
as well as URLs for NNTP newsgroup(s).