Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1614109iog; Sat, 25 Jun 2022 14:25:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s0WmsrZw5Yaz1ae99cmNsepEjU97TGXi5ispugF7xzsgiNsXT4S7mZLQB7hb/bTu2+xWEJ X-Received: by 2002:a17:90b:4c86:b0:1ec:cc0f:32da with SMTP id my6-20020a17090b4c8600b001eccc0f32damr11821763pjb.66.1656192357045; Sat, 25 Jun 2022 14:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656192357; cv=none; d=google.com; s=arc-20160816; b=oMcfWMb7NBk4LR4oAsnWFSDYBgNvbFbBtabq2siYQX4m8cggcQ4FzlwdWESsJ5nqit EIfN/hBBPkmq+kUppFXlnSqE0sOIViKtO1xHvSOHp7lBH02v56CNBcbK2N9akuOo2sSK TmB21ldAL5X7+2tJM8R05MDw5a3CFRNJesLjPenrcq82Yw2AdD7BTl8ZPda55TTO5a5u 1nvXL1Owbvr24iTtxzKAy8vktJaL+wDPNNY3NX2VVDIcOV67BRKdCw9D5Ic3sa5hXcPG ztb+XLwMwovGq9y3Z0XaySW9KHd8vZT+3PvIkcP5s/czjPG4Vs2oCn7b2P84pB5JxQP9 fhwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q/jMzgf/jsjzqIhl2ruHN5aDUCE9o0c0u+/yCZPnc7M=; b=WQHc6t+A06uD5n6zfSXpt11h9NA5+4SnAL75XQDUT9KapNsqFUVQvPHQA+vW+OTB+Y daa15JcRbLmMxmvtUUhXq41VYDOAROuWOxIoRgolgjXnTkdtRMwqyjO57O3zVFWyrG/v 2Z88z9gd22Mz5KJMgX/8NmIKcp43E9vPE/lK9VgyDuDQIVh7VyXeciCKf1qQEk3WK9CQ VpS1//Pf4htXKkFDVxaWn3ZroFgeljEXvxrHPGX0MzFX1/TD/J4UFGtW2v/38+yyqkmo 9KHMmQMH5ZLKOlmOzl+FLNLtPYeszXeSFP996ad04xErysc10BvSJWRAv4kMCvSZFWuQ VFVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=ivvHh4G3; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a63e042000000b003fc88542b01si5408230pgj.208.2022.06.25.14.25.49; Sat, 25 Jun 2022 14:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=ivvHh4G3; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233505AbiFYVYT (ORCPT + 65 others); Sat, 25 Jun 2022 17:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbiFYVYS (ORCPT ); Sat, 25 Jun 2022 17:24:18 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C672A13EB5 for ; Sat, 25 Jun 2022 14:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Q/jMzgf/jsjzqIhl2ruHN5aDUCE9o0c0u+/yCZPnc7M=; b=ivvHh4G3IrYaEWjqahgaA2VxRR ufenb3bev4WE1raB14oRmBmiL00vzF+fqClIocTscpm8wqoy5WcP9PA6/qripBOhnYUry3JPZdCKZ HFLPYJkNkRjMe2eoChRdNoJMwAPGGrf4bCtJCsr6i0XeWO0QKDdfd6n2a/BT3f3D038g=; Received: from p200300daa733bc000d99dad39793d523.dip0.t-ipconnect.de ([2003:da:a733:bc00:d99:dad3:9793:d523] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1o5DGI-0003Vi-4J; Sat, 25 Jun 2022 23:24:14 +0200 From: Felix Fietkau 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 Message-Id: <20220625212411.36675-6-nbd@nbd.name> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220625212411.36675-1-nbd@nbd.name> References: <20220625212411.36675-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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