From: Antonio Quartulli <antonio@meshcoding.com>
To: Marek Lindner <mareklindner@neomailbox.ch>
Cc: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH-maint] batman-adv: Replace gw_reselect 64 bit div with shift
Date: Mon, 22 Jun 2015 17:46:15 +0200 [thread overview]
Message-ID: <55882DC7.5090405@meshcoding.com> (raw)
In-Reply-To: <1434957203-6939-1-git-send-email-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
On 22/06/15 09:13, Sven Eckelmann wrote:
> - gw_divisor = BATADV_TQ_LOCAL_WINDOW_SIZE * BATADV_TQ_LOCAL_WINDOW_SIZE;
> - gw_divisor *= 64;
Marek can you comment on why this constant was used in this computation?
To me it looks like we only needed a "good enough number" and not a real
reference to the local window size.
The remaining change looks good to me.
If you merge this patch I'll then squash it with the uint64_t change
that we already have and I will re-send the pull request to David.
Thanks,
> -
> rcu_read_lock();
> hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
> if (gw_node->deleted)
> @@ -167,7 +163,7 @@ batadv_gw_get_best_gw_node(struct batadv_priv *bat_priv)
> tmp_gw_factor = tq_avg * tq_avg;
> tmp_gw_factor *= gw_node->bandwidth_down;
> tmp_gw_factor *= 100 * 100;
> - tmp_gw_factor /= gw_divisor;
> + tmp_gw_factor >>= 18;
>
> if ((tmp_gw_factor > max_gw_factor) ||
> ((tmp_gw_factor == max_gw_factor) &&
>
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-22 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 7:13 [B.A.T.M.A.N.] [PATCH-maint] batman-adv: Replace gw_reselect 64 bit div with shift Sven Eckelmann
2015-06-22 15:46 ` Antonio Quartulli [this message]
2015-07-10 8:12 ` Marek Lindner
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=55882DC7.5090405@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=mareklindner@neomailbox.ch \
/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.