summaryrefslogtreecommitdiff
path: root/net/mac80211/debugfs.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-06-25 23:24:05 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-01 10:51:41 +0200
commit942741dabcb43236006f557178801ce2051e69f9 (patch)
treec6ac91b8b5081264c1fb18343f89bf0b621bc60e /net/mac80211/debugfs.c
parent7f884baae68adc85db55b97e3fc903a1f20bd1f9 (diff)
wifi: mac80211: switch airtime fairness back to deficit round-robin scheduling
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 <nbd@nbd.name> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://lore.kernel.org/r/20220625212411.36675-1-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r--net/mac80211/debugfs.c70
1 files changed, 13 insertions, 57 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 1fe43b264d75..0c748b1eb023 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -216,14 +216,14 @@ static ssize_t aql_txq_limit_read(struct file *file,
"VI %u %u\n"
"BE %u %u\n"
"BK %u %u\n",
- local->airtime[IEEE80211_AC_VO].aql_txq_limit_low,
- local->airtime[IEEE80211_AC_VO].aql_txq_limit_high,
- local->airtime[IEEE80211_AC_VI].aql_txq_limit_low,
- local->airtime[IEEE80211_AC_VI].aql_txq_limit_high,
- local->airtime[IEEE80211_AC_BE].aql_txq_limit_low,
- local->airtime[IEEE80211_AC_BE].aql_txq_limit_high,
- local->airtime[IEEE80211_AC_BK].aql_txq_limit_low,
- local->airtime[IEEE80211_AC_BK].aql_txq_limit_high);
+ local->aql_txq_limit_low[IEEE80211_AC_VO],
+ local->aql_txq_limit_high[IEEE80211_AC_VO],
+ local->aql_txq_limit_low[IEEE80211_AC_VI],
+ local->aql_txq_limit_high[IEEE80211_AC_VI],
+ local->aql_txq_limit_low[IEEE80211_AC_BE],
+ local->aql_txq_limit_high[IEEE80211_AC_BE],
+ local->aql_txq_limit_low[IEEE80211_AC_BK],
+ local->aql_txq_limit_high[IEEE80211_AC_BK]);
return simple_read_from_buffer(user_buf, count, ppos,
buf, len);
}
@@ -255,11 +255,11 @@ static ssize_t aql_txq_limit_write(struct file *file,
if (ac >= IEEE80211_NUM_ACS)
return -EINVAL;
- q_limit_low_old = local->airtime[ac].aql_txq_limit_low;
- q_limit_high_old = local->airtime[ac].aql_txq_limit_high;
+ q_limit_low_old = local->aql_txq_limit_low[ac];
+ q_limit_high_old = local->aql_txq_limit_high[ac];
- local->airtime[ac].aql_txq_limit_low = q_limit_low;
- local->airtime[ac].aql_txq_limit_high = q_limit_high;
+ local->aql_txq_limit_low[ac] = q_limit_low;
+ local->aql_txq_limit_high[ac] = q_limit_high;
mutex_lock(&local->sta_mtx);
list_for_each_entry(sta, &local->sta_list, list) {
@@ -382,46 +382,6 @@ static const struct file_operations force_tx_status_ops = {
.llseek = default_llseek,
};
-static ssize_t airtime_read(struct file *file,
- char __user *user_buf,
- size_t count,
- loff_t *ppos)
-{
- struct ieee80211_local *local = file->private_data;
- char buf[200];
- u64 v_t[IEEE80211_NUM_ACS];
- u64 wt[IEEE80211_NUM_ACS];
- int len = 0, ac;
-
- for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
- spin_lock_bh(&local->airtime[ac].lock);
- v_t[ac] = local->airtime[ac].v_t;
- wt[ac] = local->airtime[ac].weight_sum;
- spin_unlock_bh(&local->airtime[ac].lock);
- }
- len = scnprintf(buf, sizeof(buf),
- "\tVO VI BE BK\n"
- "Virt-t\t%-10llu %-10llu %-10llu %-10llu\n"
- "Weight\t%-10llu %-10llu %-10llu %-10llu\n",
- v_t[0],
- v_t[1],
- v_t[2],
- v_t[3],
- wt[0],
- wt[1],
- wt[2],
- wt[3]);
-
- return simple_read_from_buffer(user_buf, count, ppos,
- buf, len);
-}
-
-static const struct file_operations airtime_ops = {
- .read = airtime_read,
- .open = simple_open,
- .llseek = default_llseek,
-};
-
#ifdef CONFIG_PM
static ssize_t reset_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
@@ -675,11 +635,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
if (local->ops->wake_tx_queue)
DEBUGFS_ADD_MODE(aqm, 0600);
- if (wiphy_ext_feature_isset(local->hw.wiphy,
- NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) {
- DEBUGFS_ADD_MODE(airtime, 0600);
- DEBUGFS_ADD_MODE(airtime_flags, 0600);
- }
+ DEBUGFS_ADD_MODE(airtime_flags, 0600);
DEBUGFS_ADD(aql_txq_limit);
debugfs_create_u32("aql_threshold", 0600,