All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: remove iteration in wake_tx_queue
@ 2019-03-27 16:29 ` Erik Stromdahl
  0 siblings, 0 replies; 20+ messages in thread
From: Erik Stromdahl @ 2019-03-27 16:29 UTC (permalink / raw)
  To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl, yiboz

Iterating the TX queue and thereby dequeuing all available packets in the
queue could result in performance penalties on some SMP systems.

The reason for this is most likely that the per-ac lock (active_txq_lock)
in mac80211 will be held by the CPU iterating the current queue.

This will lock up other CPUs trying to push new messages on the TX
queue.

Instead of iterating the queue we fetch just one packet at the time,
resulting in minimal starvation of the other CPUs.

Reported-by: Yibo Zhao <yiboz@codeaurora.org>
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index b73c23d4ce86..c9e700b844f8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4356,7 +4356,6 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
 					struct ieee80211_txq *txq)
 {
 	struct ath10k *ar = hw->priv;
-	int ret;
 	u8 ac;
 
 	ath10k_htt_tx_txq_update(hw, txq);
@@ -4369,11 +4368,9 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
 	if (!txq)
 		goto out;
 
-	while (ath10k_mac_tx_can_push(hw, txq)) {
-		ret = ath10k_mac_tx_push_txq(hw, txq);
-		if (ret < 0)
-			break;
-	}
+	if (ath10k_mac_tx_can_push(hw, txq))
+		ath10k_mac_tx_push_txq(hw, txq);
+
 	ieee80211_return_txq(hw, txq);
 	ath10k_htt_tx_txq_update(hw, txq);
 out:
-- 
2.19.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-09-25  5:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27 16:29 [PATCH] ath10k: remove iteration in wake_tx_queue Erik Stromdahl
2019-03-27 16:29 ` Erik Stromdahl
2019-03-27 17:49 ` Peter Oh
2019-03-27 17:49   ` Peter Oh
2019-03-29  7:47   ` Erik Stromdahl
2019-03-29  7:47     ` Erik Stromdahl
2019-04-01 12:17     ` Yibo Zhao
2019-04-01 12:17       ` Yibo Zhao
2019-04-01 11:05 ` Toke Høiland-Jørgensen
2019-04-01 11:05   ` Toke Høiland-Jørgensen
2019-04-16 18:54   ` Erik Stromdahl
2019-04-16 18:54     ` Erik Stromdahl
2019-04-16 19:07     ` Toke Høiland-Jørgensen
2019-04-16 19:07       ` Toke Høiland-Jørgensen
2019-04-17 13:29       ` Erik Stromdahl
2019-04-17 13:29         ` Erik Stromdahl
2019-04-26  7:07         ` Kalle Valo
2019-04-26  7:07           ` Kalle Valo
2019-09-25  5:41 ` Kalle Valo
2019-09-25  5:41 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.