From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: toke@kernel.org, johannes@sipsolutions.net
Subject: [PATCH 6/7] mac80211: add debugfs file to display per-phy AQL pending airtime
Date: Sat, 25 Jun 2022 23:24:10 +0200 [thread overview]
Message-ID: <20220625212411.36675-6-nbd@nbd.name> (raw)
In-Reply-To: <20220625212411.36675-1-nbd@nbd.name>
Now that the global pending airtime is more relevant for airtime fairness,
it makes sense to make it accessible via debugfs for debugging
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
net/mac80211/debugfs.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 0c748b1eb023..4d4341249759 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -201,6 +201,36 @@ static const struct file_operations airtime_flags_ops = {
.llseek = default_llseek,
};
+static ssize_t aql_pending_read(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ieee80211_local *local = file->private_data;
+ char buf[400];
+ int len = 0;
+
+ len = scnprintf(buf, sizeof(buf),
+ "AC AQL pending\n"
+ "VO %u us\n"
+ "VI %u us\n"
+ "BE %u us\n"
+ "BK %u us\n"
+ "total %u us\n",
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_VO]),
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_VI]),
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_BE]),
+ atomic_read(&local->aql_ac_pending_airtime[IEEE80211_AC_BK]),
+ atomic_read(&local->aql_total_pending_airtime));
+ return simple_read_from_buffer(user_buf, count, ppos,
+ buf, len);
+}
+
+static const struct file_operations aql_pending_ops = {
+ .read = aql_pending_read,
+ .open = simple_open,
+ .llseek = default_llseek,
+};
+
static ssize_t aql_txq_limit_read(struct file *file,
char __user *user_buf,
size_t count,
@@ -631,6 +661,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
DEBUGFS_ADD(hw_conf);
DEBUGFS_ADD_MODE(force_tx_status, 0600);
DEBUGFS_ADD_MODE(aql_enable, 0600);
+ DEBUGFS_ADD(aql_pending);
if (local->ops->wake_tx_queue)
DEBUGFS_ADD_MODE(aqm, 0600);
--
2.36.1
next prev parent reply other threads:[~2022-06-25 21:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 21:24 [PATCH 1/7] mac80211: switch airtime fairness back to deficit round-robin scheduling Felix Fietkau
2022-06-25 21:24 ` [PATCH 2/7] mac80211: make sta airtime deficit field s32 instead of s64 Felix Fietkau
2022-06-27 15:02 ` Toke Høiland-Jørgensen
2022-06-25 21:24 ` [PATCH 3/7] mac80211: consider aql_tx_pending when checking airtime deficit Felix Fietkau
2022-06-27 15:02 ` Toke Høiland-Jørgensen
2022-06-25 21:24 ` [PATCH 4/7] mac80211: keep recently active tx queues in scheduling list Felix Fietkau
2022-06-27 15:03 ` Toke Høiland-Jørgensen
2022-06-25 21:24 ` [PATCH 5/7] mac80211: add a per-PHY AQL limit to improve fairness Felix Fietkau
2022-06-27 15:04 ` Toke Høiland-Jørgensen
2022-06-25 21:24 ` Felix Fietkau [this message]
2022-06-27 15:04 ` [PATCH 6/7] mac80211: add debugfs file to display per-phy AQL pending airtime Toke Høiland-Jørgensen
2022-06-25 21:24 ` [PATCH 7/7] mac80211: only accumulate airtime deficit for active clients Felix Fietkau
2022-06-27 15:04 ` Toke Høiland-Jørgensen
2022-06-27 15:02 ` [PATCH 1/7] mac80211: switch airtime fairness back to deficit round-robin scheduling Toke Høiland-Jørgensen
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=20220625212411.36675-6-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@kernel.org \
/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).