linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Alexander Wetzel <Alexander@wetzel-home.de>,
	linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>,
	ath10k@lists.infradead.org, Remi Pommarel <repk@triplefau.lt>
Subject: Re: [PATCH v2 00/10] Convert mac80211 to TXQs only
Date: Wed, 19 Feb 2025 11:19:20 -0800	[thread overview]
Message-ID: <548270b0-8267-4a94-85ab-597ade0f5082@gmail.com> (raw)
In-Reply-To: <20250217081721.45110-1-Alexander@wetzel-home.de>

Hi Alexander,

On 2/17/25 12:17 AM, Alexander Wetzel wrote:
> This series switches all TX handling in mac80211 over to TXQs.
> TXQs can take over buffering in many - potentially even all - cases
> where we use separate solutions so far.
> This reduces the complexity of the TX path and making it simpler to use
> TX in mac8021.
>
> These patches continue the work to get rid of the legacy TX path we
> started drivers with
> https://lore.kernel.org/r/20221009163040.25637-1-alexander@wetzel-home.de
>
> and was inspired by this old discussion on the wireless mailing list:
> https://lore.kernel.org/r/1507217947.2387.60.camel@sipsolutions.net/
>
> Changes compared to RFC and v1 are documented in the individual patches,
> where applicable.
>
> A quick overview of the patches in the series:
>    wifi: mac80211: move rate control setup
> 	Broken off from "Add new TX queues to replace legacy TX" as
> 	requested. Moves some exiting code around.
>
>    wifi: mac80211: Always provide the MMPDU TXQ
> 	When only using TXQs for TX we akways need this.
> 	Creates and uses MMPDU TXQs even for drivers not supporting
> 	them.
>
>    wifi: mac80211: Convert vif->txq to an array
> 	We need some more TXQs for the patch below. Create them.
>
>    wifi: mac80211: Add new TX queues to replace legacy TX
> 	This starts the core of the move to TXQs.
> 	Creats all the missing TXQs and updates the support function for
> 	them. It also directly switches traffic to them, when possible.
> 	(Only offchannel is sticking to legacy TX after that.)
>
>    wifi: mac80211: Stop using legacy TX path
> 	Drop the legacy TX functions and move offchannel TX to the new
> 	alternate TXQ path named TXQ_NOQUEUE (so far).
>          With that mac80211 has two TX paths both using TXQ:
>           - The existing one, which uses the TXQ for queuing and
>           - TXQ_NOQUEUE. Which just puts frames into a TXQ and
>             immediately sends out the frame by also calling drv_tx() for
>             it. There never can be more than one frame in any of these
>             TXQs. They never see a wake_tx_queue call by the driver or
>             mac80211.
>
>    wifi: mac80211: Call ieee80211_tx_h_select_key only once
> 	A optimization which could be without the patches, too. Would
> 	just be done differently. (Not required)
>
>    wifi: mac80211: Rename IEEE80211_TX_INTFL_OFFCHAN_TX_OK
> 	Rename the flag used to select the NOQUEU TX path to make its
> 	use more obvious.
>
>    wifi: mac80211: Simplify AMPDU handling
> 	Uses TXQs to buffer frames when AMPDU is started/stopped.
>
>    wifi: mac80211: Migrate TX to kthread
> 	Moves all TX operation except TXQ_NOQUEUE to a new kthread.
>          This hooks into the existing txq scheduling and uses
> 	local->active_txqs to determine which TXQs need to run.
>
>    wifi: mac80211: Cleanup *ieee80211_wake_txq* naming
> 	Rename a few functions.
>
>   drivers/net/wireless/ath/ath10k/mac.c         |   8 +-
>   drivers/net/wireless/ath/ath9k/ath9k.h        |   2 +-
>   .../net/wireless/intel/iwlwifi/mvm/mac80211.c |   6 +-
>   .../net/wireless/mediatek/mt76/mt7603/main.c  |   3 +-
>   .../net/wireless/mediatek/mt76/mt7615/main.c  |   5 +-
>   .../net/wireless/mediatek/mt76/mt76x02_util.c |   3 +-
>   .../net/wireless/mediatek/mt76/mt7915/main.c  |   6 +-
>   .../net/wireless/mediatek/mt76/mt7921/main.c  |   5 +-
>   .../net/wireless/mediatek/mt76/mt7925/main.c  |   5 +-
>   .../net/wireless/mediatek/mt76/mt7996/main.c  |   5 +-
>   drivers/net/wireless/realtek/rtw88/mac80211.c |   4 +-
>   drivers/net/wireless/realtek/rtw88/main.c     |   2 +-
>   drivers/net/wireless/realtek/rtw89/mac80211.c |   2 +-
>   include/net/mac80211.h                        |  60 +-
>   net/mac80211/agg-tx.c                         | 129 +---
>   net/mac80211/cfg.c                            |   8 +-
>   net/mac80211/debugfs_netdev.c                 |  46 +-
>   net/mac80211/debugfs_sta.c                    |   2 -
>   net/mac80211/driver-ops.h                     |  28 +-
>   net/mac80211/ieee80211_i.h                    |  32 +-
>   net/mac80211/iface.c                          | 144 ++--
>   net/mac80211/main.c                           |   9 +-
>   net/mac80211/mesh.c                           |  13 +-
>   net/mac80211/mlme.c                           |   2 +-
>   net/mac80211/offchannel.c                     |   2 +-
>   net/mac80211/rx.c                             |  11 +-
>   net/mac80211/scan.c                           |   2 +-
>   net/mac80211/sta_info.c                       |   6 +-
>   net/mac80211/sta_info.h                       |  30 +-
>   net/mac80211/tx.c                             | 616 ++++--------------
>   net/mac80211/util.c                           | 162 +++--
>   31 files changed, 534 insertions(+), 824 deletions(-)
>
Trying to get some clarity if this might fix a regression [1] with 
ath10k where upon roaming the TX queue hangs on flush for ~4-10 seconds. 
I was hopeful for another set [2] but it looks like this only effected 
AP mode and with that applied I still notice the behavior.

In the worse case we see two failures, which add up to about 10 seconds 
of delays, more often its just the single "failed to flush transmit queue"

Feb 19 14:15:59 kernel: ath10k_pci 0000:02:00.0: failed to flush sta txq 
(sta 6a:3a:0e:22:45:08 skip 0 ar-state 1): 0
Feb 19 14:16:04 kernel: ath10k_pci 0000:02:00.0: failed to flush 
transmit queue (skip 0 ar-state 1): 0

Crossing my fingers this set will have some positive effect here

[1] 
https://lore.kernel.org/all/CA+Xfe4FjUmzM5mvPxGbpJsF3SvSdE5_wgxvgFJ0bsdrKODVXCQ@mail.gmail.com/
[2] 
https://lore.kernel.org/linux-wireless/cover.1732293922.git.repk@triplefau.lt/

Thanks,

James


  parent reply	other threads:[~2025-02-19 19:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17  8:17 [PATCH v2 00/10] Convert mac80211 to TXQs only Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 01/10] wifi: mac80211: move rate control setup Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 02/10] wifi: mac80211: Always provide the MMPDU TXQ Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 03/10] wifi: mac80211: Convert vif->txq to an array Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 04/10] wifi: mac80211: Add new TX queues to replace legacy TX Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 05/10] wifi: mac80211: Stop using legacy TX path Alexander Wetzel
2025-02-17 22:33   ` kernel test robot
2025-02-17  8:17 ` [PATCH v2 06/10] wifi: mac80211: Call ieee80211_tx_h_select_key only once Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 07/10] wifi: mac80211: Rename IEEE80211_TX_INTFL_OFFCHAN_TX_OK Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 08/10] wifi: mac80211: Simplify AMPDU handling Alexander Wetzel
2025-02-17 16:30   ` kernel test robot
2025-02-17  8:17 ` [PATCH v2 09/10] wifi: mac80211: Migrate TX to kthread Alexander Wetzel
2025-02-17  8:17 ` [PATCH v2 10/10] wifi: mac80211: Cleanup *ieee80211_wake_txq* naming Alexander Wetzel
2025-02-19 19:19 ` James Prestwood [this message]
2025-02-19 21:27   ` [PATCH v2 00/10] Convert mac80211 to TXQs only Alexander Wetzel
2025-02-20 13:56     ` James Prestwood

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=548270b0-8267-4a94-85ab-597ade0f5082@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=Alexander@wetzel-home.de \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=repk@triplefau.lt \
    /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).