From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Baligh Gasmi" <gasmibal@gmail.com>,
"Johannes Berg" <johannes@sipsolutions.net>
Cc: "David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, "Felix Fietkau" <nbd@nbd.name>,
"Toke Hoiland-Jorgensen" <toke@redhat.com>,
"Linus Lussing" <linus.luessing@c0d3.blue>,
"Kalle Valo" <kvalo@kernel.org>
Subject: Re: [RFC/RFT v5 3/4] mac80211: add busy time factor into expected throughput
Date: Thu, 25 Aug 2022 15:36:34 +0200 [thread overview]
Message-ID: <CMF5ERVFCDM9.G96GZB43SEWO@syracuse> (raw)
In-Reply-To: <20220719123525.3448926-4-gasmibal@gmail.com>
On Tue Jul 19, 2022 at 2:35 PM CEST, Baligh Gasmi wrote:
> When estimating the expected throughput, take into account the busy time
> of the current channel.
>
> Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
> ---
> net/mac80211/sta_info.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> index 201aab465234..7e32c06ae771 100644
> --- a/net/mac80211/sta_info.c
> +++ b/net/mac80211/sta_info.c
> @@ -2000,6 +2000,8 @@ void ieee80211_sta_update_tp(struct ieee80211_local *local,
> bool ack, int retry)
> {
> unsigned long diff;
> + struct ieee80211_sub_if_data *sdata;
> + u32 avg_busy;
> struct rate_control_ref *ref = NULL;
>
> if (!skb || !sta || !tx_time_est)
> @@ -2014,6 +2016,7 @@ void ieee80211_sta_update_tp(struct ieee80211_local *local,
> if (local->ops->get_expected_throughput)
> return;
>
> + sdata = sta->sdata;
> tx_time_est += ack ? 4 : 0;
> tx_time_est += retry ? retry * 2 : 2;
>
> @@ -2022,6 +2025,10 @@ void ieee80211_sta_update_tp(struct ieee80211_local *local,
>
> diff = jiffies - sta->deflink.status_stats.last_tp_update;
> if (diff > HZ / 10) {
> + avg_busy = ewma_avg_busy_read(&sdata->avg_busy) >> 1;
> + sta->deflink.tx_stats.tp_tx_time_est +> + (sta->deflink.tx_stats.tp_tx_time_est * avg_busy) / 100;
Once again div_u64() ?
> +
> ewma_avg_est_tp_add(&sta->deflink.status_stats.avg_est_tp,
> sta->deflink.tx_stats.tp_tx_size /
> sta->deflink.tx_stats.tp_tx_time_est);
> --
> 2.37.1
next prev parent reply other threads:[~2022-08-25 13:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 12:35 [RFC/RFT v5 0/4] expected throughput from AQL airtime Baligh Gasmi
2022-07-19 12:35 ` [RFC/RFT v5 1/4] mac80211: use AQL airtime for expected throughput Baligh Gasmi
2022-08-25 13:31 ` Nicolas Escande
2022-08-25 14:17 ` Baligh GASMI
2022-07-19 12:35 ` [RFC/RFT v5 2/4] mac80211: add periodic monitor for channel busy time Baligh Gasmi
2022-08-25 8:58 ` Johannes Berg
2022-08-25 9:27 ` Baligh GASMI
2022-08-25 13:35 ` Nicolas Escande
2022-07-19 12:35 ` [RFC/RFT v5 3/4] mac80211: add busy time factor into expected throughput Baligh Gasmi
2022-08-25 13:36 ` Nicolas Escande [this message]
2022-07-19 12:35 ` [RFC/RFT v5 4/4] mac80211: extend channel info with average busy time Baligh Gasmi
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=CMF5ERVFCDM9.G96GZB43SEWO@syracuse \
--to=nico.escande@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gasmibal@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linus.luessing@c0d3.blue \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@redhat.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).