From: Alexander Ganslandt <alexander.ganslandt@axis.com>
To: iwd@lists.linux.dev
Subject: Re: [PATCH RFC 3/3] station: improve roam scan strategy
Date: Wed, 7 May 2025 14:53:32 +0200 [thread overview]
Message-ID: <c56180f6-8eff-479e-93ab-522bd8a43ad2@axis.com> (raw)
In-Reply-To: <ab31a956-b65b-4b42-b37c-a1c63385d3c9@gmail.com>
Hello James and Denis,
Thank you both for the feedback! I want to focus on the overall idea
here and will look at the code details later.
On 4/16/25 18:46, James Prestwood wrote:
> Won't this start reusing the same frequencies after a few scans? Say
> your first N scans take more than 3 seconds, you'd then begin using
> those frequencies again on subsequent scans since their ages are under
> the threshold?
>
> Rather than a hard threshold simply sorting by age seems like the best
> way to do this:
>
> - Sort the frequencies by least recently used -> Take the first N
> frequencies -> Scan
> - No candidates found? -> Repeat ^^^
Yes, it will start reusing frequencies and might never reach the less
common frequencies depending on how long time the scans take. That's
definitely not ideal. Looking at the age as you suggest has the problem
that it will eventually spend time scanning uncommon frequencies when
that time would have been better spent scanning common frequencies that
are getting old.
Maybe this is an impossible task to solve perfectly as there will always
be a trade-off, maybe it's better left as configs for the user? In my
livestream use case the APs should be configured such that most good
frequencies are in "neighbor" or "known", so I would like to spend most
time on these frequencies. However, for a use case where the network
setup is unknown, having more exploration of uncommon frequencies might
be better.
We could have configs instead where users can define the subsets and age
threshold. If they don't set anything, the default is the current
behavior. If they set subsets, the roaming algorithm will pick
frequencies from those in the prioritized order, just like this patch
does. It could still get stuck scanning the same frequencies if the age
threshold is too low, but then it would be a user configuration error.
We then also get rid of hard-coding frequencies in IWD and all problems
that causes, but still give users the possibility to do so if needed.
Does this make more sense?
On 4/16/25 19:19, Denis Kenzior wrote:
> Have you considered maintaining a scan_freq_set of all the frequencies
> scanned
> by the neighbor and known-frequency stages instead of maintaining an
> hashtable
> based on age?
I don't completely follow what you mean here. The reason for having the
hashtable is to know how long ago a certain frequency was scanned in
order to not scan it again too soon. So that info will have to be stored
somehow, or did you have some other approach in mind?
> So the idea is to add up to STATION_MAX_SCAN_FREQS to a new set,
> starting in
> order of preference with:
> 1. neighbor frequency set
> 2. known network set
> 3. scan frequency ordering set
>
> while filtering the frequencies already scanned.
>
> How do you know when to give up the current attempt?
Yes, correct. Do you mean when to give up on the roaming attempt
completely? The current approach is to never give up, it will continue
scanning frequencies in the subsets until it finds a better BSS, or
until the current BSS signal goes above the threshold and roaming stops.
I believe this is also what IWD does today, except it uses full scans
continuously.
Regards,
Alexander
next prev parent reply other threads:[~2025-05-07 12:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 8:21 [PATCH RFC 0/3] Improve roam scan strategy Alexander Ganslandt
2025-04-15 8:21 ` [PATCH RFC 1/3] util: add scan_freq_set_size function Alexander Ganslandt
2025-04-15 8:21 ` [PATCH RFC 2/3] scan: add scan_freq_map Alexander Ganslandt
2025-04-15 8:21 ` [PATCH RFC 3/3] station: improve roam scan strategy Alexander Ganslandt
2025-04-16 16:46 ` James Prestwood
2025-04-16 17:19 ` Denis Kenzior
2025-05-07 12:53 ` Alexander Ganslandt [this message]
2025-05-07 15:40 ` James Prestwood
2025-05-07 16:31 ` Denis Kenzior
2025-05-09 8:53 ` Alexander Ganslandt
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=c56180f6-8eff-479e-93ab-522bd8a43ad2@axis.com \
--to=alexander.ganslandt@axis.com \
--cc=iwd@lists.linux.dev \
/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.