diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-01-23 00:17:31 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-01-25 12:19:22 +0100 |
commit | 37752336bdfb361d597b316cd5bb9d8dc6ac1762 (patch) | |
tree | 7a9104a329436b31a696bae0e17e1c6d513c22dd /package/kernel/mac80211/patches/subsys/350-mac80211-minstrel_ht-show-sampling-rates-in-debugfs.patch | |
parent | 1fb413e6579a34a0040b526e681298909dfaa5ac (diff) | |
download | upstream-37752336bdfb361d597b316cd5bb9d8dc6ac1762.tar.gz upstream-37752336bdfb361d597b316cd5bb9d8dc6ac1762.tar.bz2 upstream-37752336bdfb361d597b316cd5bb9d8dc6ac1762.zip |
mac80211: add significant minstrel_ht performance improvements
Completely redesign the rate sampling approach
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/350-mac80211-minstrel_ht-show-sampling-rates-in-debugfs.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/350-mac80211-minstrel_ht-show-sampling-rates-in-debugfs.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/350-mac80211-minstrel_ht-show-sampling-rates-in-debugfs.patch b/package/kernel/mac80211/patches/subsys/350-mac80211-minstrel_ht-show-sampling-rates-in-debugfs.patch new file mode 100644 index 0000000000..41910e0d18 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/350-mac80211-minstrel_ht-show-sampling-rates-in-debugfs.patch @@ -0,0 +1,59 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Sat, 23 Jan 2021 00:10:34 +0100 +Subject: [PATCH] mac80211: minstrel_ht: show sampling rates in debugfs + +This makes it easier to see what rates are going to be tested next + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/net/mac80211/rc80211_minstrel_ht_debugfs.c ++++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c +@@ -32,6 +32,18 @@ minstrel_stats_release(struct inode *ino + return 0; + } + ++static bool ++minstrel_ht_is_sample_rate(struct minstrel_ht_sta *mi, int idx) ++{ ++ int type, i; ++ ++ for (type = 0; type < ARRAY_SIZE(mi->sample); type++) ++ for (i = 0; i < MINSTREL_SAMPLE_RATES; i++) ++ if (mi->sample[type].cur_sample_rates[i] == idx) ++ return true; ++ return false; ++} ++ + static char * + minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p) + { +@@ -84,6 +96,7 @@ minstrel_ht_stats_dump(struct minstrel_h + *(p++) = (idx == mi->max_tp_rate[2]) ? 'C' : ' '; + *(p++) = (idx == mi->max_tp_rate[3]) ? 'D' : ' '; + *(p++) = (idx == mi->max_prob_rate) ? 'P' : ' '; ++ *(p++) = minstrel_ht_is_sample_rate(mi, idx) ? 'S' : ' '; + + if (gflags & IEEE80211_TX_RC_MCS) { + p += sprintf(p, " MCS%-2u", (mg->streams - 1) * 8 + j); +@@ -145,9 +158,9 @@ minstrel_ht_stats_open(struct inode *ino + + p += sprintf(p, "\n"); + p += sprintf(p, +- " best ____________rate__________ ____statistics___ _____last____ ______sum-of________\n"); ++ " best ____________rate__________ ____statistics___ _____last____ ______sum-of________\n"); + p += sprintf(p, +- "mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts]\n"); ++ "mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts]\n"); + + p = minstrel_ht_stats_dump(mi, MINSTREL_CCK_GROUP, p); + for (i = 0; i < MINSTREL_CCK_GROUP; i++) +@@ -228,6 +241,8 @@ minstrel_ht_stats_csv_dump(struct minstr + p += sprintf(p, "%s" ,((idx == mi->max_tp_rate[2]) ? "C" : "")); + p += sprintf(p, "%s" ,((idx == mi->max_tp_rate[3]) ? "D" : "")); + p += sprintf(p, "%s" ,((idx == mi->max_prob_rate) ? "P" : "")); ++ p += sprintf(p, "%s" ,((idx == mi->max_prob_rate) ? "P" : "")); ++ p += sprintf(p, "%s", (minstrel_ht_is_sample_rate(mi, idx) ? "S" : "")); + + if (gflags & IEEE80211_TX_RC_MCS) { + p += sprintf(p, ",MCS%-2u,", (mg->streams - 1) * 8 + j); |