From 942741dabcb43236006f557178801ce2051e69f9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 25 Jun 2022 23:24:05 +0200 Subject: wifi: mac80211: switch airtime fairness back to deficit round-robin scheduling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commits 6a789ba679d652587532cec2a0e0274fda172f3b and 2433647bc8d983a543e7d31b41ca2de1c7e2c198. The virtual time scheduler code has a number of issues: - queues slowed down by hardware/firmware powersave handling were not properly handled. - on ath10k in push-pull mode, tx queues that the driver tries to pull from were starved, causing excessive latency - delay between tx enqueue and reported airtime use were causing excessively bursty tx behavior The bursty behavior may also be present on the round-robin scheduler, but there it is much easier to fix without introducing additional regressions Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20220625212411.36675-1-nbd@nbd.name Signed-off-by: Johannes Berg --- net/mac80211/sta_info.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'net/mac80211/sta_info.h') diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 4e0b969891de..3e26ad3be800 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -135,25 +135,18 @@ enum ieee80211_agg_stop_reason { #define AIRTIME_USE_TX BIT(0) #define AIRTIME_USE_RX BIT(1) - struct airtime_info { u64 rx_airtime; u64 tx_airtime; - u64 v_t; - u64 last_scheduled; - struct list_head list; + s64 deficit; atomic_t aql_tx_pending; /* Estimated airtime for frames pending */ u32 aql_limit_low; u32 aql_limit_high; - u32 weight_reciprocal; - u16 weight; }; void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, struct sta_info *sta, u8 ac, u16 tx_airtime, bool tx_completed); -void ieee80211_register_airtime(struct ieee80211_txq *txq, - u32 tx_airtime, u32 rx_airtime); struct sta_info; @@ -609,6 +602,7 @@ struct link_sta_info { * @tid_seq: per-TID sequence numbers for sending to this STA * @airtime: per-AC struct airtime_info describing airtime statistics for this * station + * @airtime_weight: station weight for airtime fairness calculation purposes * @ampdu_mlme: A-MPDU state machine state * @mesh: mesh STA information * @debugfs_dir: debug filesystem directory dentry @@ -693,6 +687,7 @@ struct sta_info { u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]; struct airtime_info airtime[IEEE80211_NUM_ACS]; + u16 airtime_weight; /* * Aggregation information, locked with lock. -- cgit v1.2.3