From patchwork Fri Feb 5 12:55:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 12071245 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50FCEC433DB for ; Fri, 5 Feb 2021 22:49:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED0F264FF9 for ; Fri, 5 Feb 2021 22:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233332AbhBEWs2 (ORCPT ); Fri, 5 Feb 2021 17:48:28 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:45030 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232282AbhBEM4v (ORCPT ); Fri, 5 Feb 2021 07:56:51 -0500 X-UUID: 10d03a1a03dd4528976475067e38c23e-20210205 X-UUID: 10d03a1a03dd4528976475067e38c23e-20210205 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 527900021; Fri, 05 Feb 2021 20:55:58 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Feb 2021 20:55:57 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 5 Feb 2021 20:55:57 +0800 From: Ryder Lee To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= CC: Felix Fietkau , Lorenzo Bianconi , Shayne Chen , , , Ryder Lee Subject: [PATCH] mac80211: only schedule TXQ when reasonable airtime reporting Date: Fri, 5 Feb 2021 20:55:54 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org For some drivers and hardware may report faulty airtime, which ends up with excessive hold time (~0.9s on mt7915 multiclent tests) impacting system performance. Although issue has been fixed in driver, but it make sense to select txqi depends on a reasonable airtime reporting to prevent such a case from happening again. Tested-by: Jiao Bo Tested-by: Sujuan Chen Signed-off-by: Ryder Lee --- net/mac80211/tx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 6422da6690f7..0b8a8c3600f4 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3770,6 +3770,10 @@ struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) sta->airtime_weight; if (deficit < 0 || !aql_check) { + if (txqi->schedule_round == local->schedule_round[ac]) + goto out; + + txqi->schedule_round = local->schedule_round[ac]; list_move_tail(&txqi->schedule_order, &local->active_txqs[txqi->txq.ac]); goto begin;