parent
c2e0c41842
commit
4bab4dee84
@ -0,0 +1,67 @@ |
|||||||
|
From: Michal Kazior <michal.kazior@tieto.com>
|
||||||
|
Date: Mon, 23 May 2016 23:12:45 +0300
|
||||||
|
Subject: [PATCH] ath10k: improve tx scheduling
|
||||||
|
|
||||||
|
Recent changes revolving around implementing
|
||||||
|
wake_tx_queue support introduced a significant
|
||||||
|
performance regressions on some (slower, uni-proc)
|
||||||
|
systems.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
|
||||||
|
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||||
|
@@ -2291,7 +2291,6 @@ bool ath10k_htt_t2h_msg_handler(struct a
|
||||||
|
ath10k_htt_tx_mgmt_dec_pending(htt);
|
||||||
|
spin_unlock_bh(&htt->tx_lock);
|
||||||
|
}
|
||||||
|
- ath10k_mac_tx_push_pending(ar);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case HTT_T2H_MSG_TYPE_TX_COMPL_IND:
|
||||||
|
@@ -2442,8 +2441,6 @@ static void ath10k_htt_txrx_compl_task(u
|
||||||
|
dev_kfree_skb_any(skb);
|
||||||
|
}
|
||||||
|
|
||||||
|
- ath10k_mac_tx_push_pending(ar);
|
||||||
|
-
|
||||||
|
num_mpdus = atomic_read(&htt->num_mpdus_ready);
|
||||||
|
|
||||||
|
while (num_mpdus) {
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
@@ -3827,6 +3827,9 @@ void ath10k_mac_tx_push_pending(struct a
|
||||||
|
int ret;
|
||||||
|
int max;
|
||||||
|
|
||||||
|
+ if (ar->htt.num_pending_tx >= (ar->htt.max_num_pending_tx / 2))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
spin_lock_bh(&ar->txqs_lock);
|
||||||
|
rcu_read_lock();
|
||||||
|
|
||||||
|
@@ -4097,9 +4100,7 @@ static void ath10k_mac_op_wake_tx_queue(
|
||||||
|
list_add_tail(&artxq->list, &ar->txqs);
|
||||||
|
spin_unlock_bh(&ar->txqs_lock);
|
||||||
|
|
||||||
|
- if (ath10k_mac_tx_can_push(hw, txq))
|
||||||
|
- tasklet_schedule(&ar->htt.txrx_compl_task);
|
||||||
|
-
|
||||||
|
+ ath10k_mac_tx_push_pending(ar);
|
||||||
|
ath10k_htt_tx_txq_update(hw, txq);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/txrx.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
|
||||||
|
@@ -117,6 +117,9 @@ int ath10k_txrx_tx_unref(struct ath10k_h
|
||||||
|
|
||||||
|
ieee80211_tx_status(htt->ar->hw, msdu);
|
||||||
|
/* we do not own the msdu anymore */
|
||||||
|
+
|
||||||
|
+ ath10k_mac_tx_push_pending(ar);
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@ |
|||||||
|
From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
|
||||||
|
Date: Thu, 9 Jun 2016 11:33:55 +0530
|
||||||
|
Subject: [PATCH] ath10k: fix deadlock while processing rx_in_ord_ind
|
||||||
|
|
||||||
|
commit 5c86d97bcc1d ("ath10k: combine txrx and replenish task")
|
||||||
|
introduced deadlock while processing rx in order indication message
|
||||||
|
for qca6174 based devices. While merging replenish and txrx tasklets,
|
||||||
|
replenish task should be called out of htt rx ring locking since it
|
||||||
|
is also try to acquire the same lock.
|
||||||
|
|
||||||
|
Unfortunately this issue is not exposed by other solutions (qca988x,
|
||||||
|
qca99x0 & qca4019), as rx_in_ord_ind message is specific to qca6174
|
||||||
|
based devices. This patch fixes
|
||||||
|
|
||||||
|
=============================================
|
||||||
|
[ INFO: possible recursive locking detected ]
|
||||||
|
4.7.0-rc2-wt-ath+ #1353 Tainted: G E
|
||||||
|
---------------------------------------------
|
||||||
|
swapper/3/0 is trying to acquire lock:
|
||||||
|
(&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d7ef19>]
|
||||||
|
ath10k_htt_rx_msdu_buff_replenish+0x29/0x90 [ath10k_core]
|
||||||
|
|
||||||
|
but task is already holding lock:
|
||||||
|
(&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d82cab>]
|
||||||
|
ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core]
|
||||||
|
|
||||||
|
other info that might help us debug this:
|
||||||
|
Possible unsafe locking scenario:
|
||||||
|
|
||||||
|
CPU0
|
||||||
|
----
|
||||||
|
lock(&(&htt->rx_ring.lock)->rlock);
|
||||||
|
lock(&(&htt->rx_ring.lock)->rlock);
|
||||||
|
|
||||||
|
*** DEADLOCK ***
|
||||||
|
|
||||||
|
May be due to missing lock nesting notation
|
||||||
|
|
||||||
|
1 lock held by swapper/3/0:
|
||||||
|
#0: (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [<f8d82cab>]
|
||||||
|
ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core]
|
||||||
|
|
||||||
|
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=119151
|
||||||
|
Fixes: 5c86d97bcc1d ("ath10k: combine txrx and replenish task")
|
||||||
|
Reported-by: Mike Lothian <mike@fireburn.co.uk>
|
||||||
|
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
|
||||||
|
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||||
|
@@ -1904,7 +1904,6 @@ static void ath10k_htt_rx_in_ord_ind(str
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- ath10k_htt_rx_msdu_buff_replenish(htt);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ath10k_htt_rx_tx_fetch_resp_id_confirm(struct ath10k *ar,
|
Loading…
Reference in new issue