From patchwork Sun Sep 16 17:42:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 10601729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 654F414DA for ; Sun, 16 Sep 2018 17:42:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53D35296C4 for ; Sun, 16 Sep 2018 17:42:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47D3F2970B; Sun, 16 Sep 2018 17:42:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2946296C4 for ; Sun, 16 Sep 2018 17:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728333AbeIPXFw (ORCPT ); Sun, 16 Sep 2018 19:05:52 -0400 Received: from mail.toke.dk ([52.28.52.200]:47131 "EHLO mail.toke.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728216AbeIPXFw (ORCPT ); Sun, 16 Sep 2018 19:05:52 -0400 Subject: [PATCH RFC v4 0/4] Move TXQ scheduling into mac80211 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1537119731; bh=F0CBmvJlJojy3qUcgM5uZ/tYs+PwSEjlyJHFCoqirxo=; h=Subject:From:To:Cc:Date:From; b=xrx5b9N0n1f5At+2hu4AoAqTpvhppOlVaDrbW5vJVjyyZ1OHoh33D3lmucJrg8pxU /o9H5OF6PNL7ZQBbVol7470yQ3qyjmw18a2pa3CfYWVZs6vysB1AHZswElIUEAEnET Ol3Mlv30mWFo7fqyPq0yoLkKQ5d9tP/qw1islehFJL+RWxL+V05rGiFXkKFHB3+Y41 q5JY3OcUSje31dI+XoYdwHvMzi3Rt0XbLYLhTg2HB6mD0+4NVWCrGwD7PGmHbszhbk UUQUIX7+zVV08VoN5p7mGR2aS0rL1SbKHZtFZ4f8+/5b1lPevQA+1KiXcSh8LNlb1f +Sw+G+A6LO7cQ== From: Toke =?utf-8?q?H=C3=B8iland-J=C3=B8rgensen?= To: linux-wireless@vger.kernel.org Cc: make-wifi-fast@lists.bufferbloat.net, Felix Fietkau , Rajkumar Manoharan , Kan Yan Date: Sun, 16 Sep 2018 19:42:11 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <153711966150.9231.13481453399723518107.stgit@alrua-x1> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Another update, addressing most of the concerns raised in the last round: - Added schedule_start()/end() functions that adds locking around the whole scheduling operation, which means we can get rid of the 'first' parameter to ieee80211_next_txq(). - Adds a callback in the wake_txqs tasklet which will ensure that any TXQs throttled by ieee80211_txq_may_transmit() will get woken up again. This also makes it possible to ensure all TXQs' deficits are increased in the case where the rotation in may_transmit is not effective because TXQs are not scheduled in round-robin order by the hardware. As part of this, bring back the flag that marks a TXQ as throttled. - Rename ieee80211_schedule_txq() to ieee80211_return_txq() and add a check of empty TXQs inside it, so the driver can just call it unconditionally. - Add a call to ieee80211_sta_register_airtime() from the existing tx_status path if tx_time is set in the tx_info status field. - Reorder the patches to the cfg80211 airtime changes come before the changes to mac80211. I didn't port over Kan's "airtime queue limits" stuff yet, partly because I ran out of time, and partly because I wasn't use if he wanted to do it himself :) -Toke --- Toke Høiland-Jørgensen (4): mac80211: Add TXQ scheduling API cfg80211: Add airtime statistics and settings mac80211: Add airtime accounting and scheduling to TXQs ath9k: Switch to mac80211 TXQ scheduling and airtime APIs drivers/net/wireless/ath/ath9k/ath9k.h | 14 -- drivers/net/wireless/ath/ath9k/debug.c | 3 drivers/net/wireless/ath/ath9k/debug.h | 8 - drivers/net/wireless/ath/ath9k/debug_sta.c | 54 ------ drivers/net/wireless/ath/ath9k/init.c | 3 drivers/net/wireless/ath/ath9k/recv.c | 9 - drivers/net/wireless/ath/ath9k/xmit.c | 244 ++++++++-------------------- include/net/cfg80211.h | 10 + include/net/mac80211.h | 114 +++++++++++++ include/uapi/linux/nl80211.h | 15 ++ net/mac80211/agg-tx.c | 2 net/mac80211/cfg.c | 3 net/mac80211/debugfs.c | 3 net/mac80211/debugfs_sta.c | 51 ++++++ net/mac80211/driver-ops.h | 9 + net/mac80211/ieee80211_i.h | 12 + net/mac80211/main.c | 6 + net/mac80211/sta_info.c | 51 ++++++ net/mac80211/sta_info.h | 13 + net/mac80211/status.c | 6 + net/mac80211/tx.c | 134 +++++++++++++++ net/mac80211/util.c | 55 ++++++ net/wireless/nl80211.c | 29 +++ 23 files changed, 575 insertions(+), 273 deletions(-) X-Clacks-Overhead: GNU Terry Pratchett