Search Linux Wireless

Re: [RFC 1/2] ath10k: migrate to mac80211 txq scheduling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-09-26 17:41, Rajkumar Manoharan wrote:
@@ -4293,32 +4281,7 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
 static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
 					struct ieee80211_txq *txq)
 {
-	struct ath10k *ar = hw->priv;
-	struct ath10k_txq *artxq = (void *)txq->drv_priv;
-	struct ieee80211_txq *f_txq;
-	struct ath10k_txq *f_artxq;
-	int ret = 0;
-	int max = HTC_HOST_MAX_MSG_PER_TX_BUNDLE;
-
-	spin_lock_bh(&ar->txqs_lock);
-	if (list_empty(&artxq->list))
-		list_add_tail(&artxq->list, &ar->txqs);
-
-	f_artxq = list_first_entry(&ar->txqs, struct ath10k_txq, list);
- f_txq = container_of((void *)f_artxq, struct ieee80211_txq, drv_priv);
-	list_del_init(&f_artxq->list);
-
-	while (ath10k_mac_tx_can_push(hw, f_txq) && max--) {
-		ret = ath10k_mac_tx_push_txq(hw, f_txq);
-		if (ret < 0)
-			break;
-	}
-	if (ret != -ENOENT)
-		list_add_tail(&f_artxq->list, &ar->txqs);
-	spin_unlock_bh(&ar->txqs_lock);
-
-	ath10k_htt_tx_txq_update(hw, f_txq);
-	ath10k_htt_tx_txq_update(hw, txq);
+	ath10k_mac_schedule_txq(hw, txq->ac);
 }

With below change I were able to fix the performance impact in multiclient scenario.
Will fold them in next version.

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6da64412cc14..965aaa731f04 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4473,7 +4473,26 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
 static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
                                        struct ieee80211_txq *txq)
 {
-       ath10k_mac_schedule_txq(hw, txq->ac);
+       u8 ac = txq->ac;
+       int ret = 0;
+
+       ieee80211_txq_schedule_start(hw, ac);
+       txq = ieee80211_next_txq(hw, ac);
+       ieee80211_txq_schedule_end(hw, ac);
+       if (!txq)
+               return;
+
+       while (ath10k_mac_tx_can_push(hw, txq)) {
+               ret = ath10k_mac_tx_push_txq(hw, txq);
+               if (ret < 0)
+                       break;
+       }
+       if (ret == -EBUSY) {
+               ieee80211_txq_schedule_start(hw, ac);
+               ieee80211_return_txq(hw, txq);
+               ieee80211_txq_schedule_end(hw, ac);
+       }
+       ath10k_htt_tx_txq_update(hw, txq);
 }

-Rajkumar



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux