Re: [PATCH 1/2] ath10k: reduce rx_lock contention for htt rx indication

2016-03-04 Thread Valo, Kalle
Rajkumar Manoharan  writes:

> Received frame indications are queued into a skb list and latest
> processed by txrx tasklet. This skb queue is protected by htt rx lock.
> Since the entire rx processing till delivering frame to mac80211 and
> replenish tasks are processed under rx_lock protection, there might be
> some delay in queuing newly received rx frame into that list on
> multicore systems. Optimize this by using skb list lock while accessing
> rx completion queue instead of htt rx lock.
>
> Signed-off-by: Rajkumar Manoharan 

Both applied, thanks.

-- 
Kalle Valo--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ath10k: reduce rx_lock contention for htt rx indication

2016-02-11 Thread Rajkumar Manoharan
Received frame indications are queued into a skb list and latest
processed by txrx tasklet. This skb queue is protected by htt rx lock.
Since the entire rx processing till delivering frame to mac80211 and
replenish tasks are processed under rx_lock protection, there might be
some delay in queuing newly received rx frame into that list on
multicore systems. Optimize this by using skb list lock while accessing
rx completion queue instead of htt rx lock.

Signed-off-by: Rajkumar Manoharan 
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c 
b/drivers/net/wireless/ath/ath10k/htt_rx.c
index cc957a6..bedd8c3 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2011,9 +2011,7 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct 
sk_buff *skb)
break;
}
case HTT_T2H_MSG_TYPE_RX_IND:
-   spin_lock_bh(>rx_ring.lock);
-   __skb_queue_tail(>rx_compl_q, skb);
-   spin_unlock_bh(>rx_ring.lock);
+   skb_queue_tail(>rx_compl_q, skb);
tasklet_schedule(>txrx_compl_task);
return;
case HTT_T2H_MSG_TYPE_PEER_MAP: {
@@ -2111,9 +2109,7 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct 
sk_buff *skb)
break;
}
case HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND: {
-   spin_lock_bh(>rx_ring.lock);
-   __skb_queue_tail(>rx_in_ord_compl_q, skb);
-   spin_unlock_bh(>rx_ring.lock);
+   skb_queue_tail(>rx_in_ord_compl_q, skb);
tasklet_schedule(>txrx_compl_task);
return;
}
@@ -2174,16 +2170,18 @@ static void ath10k_htt_txrx_compl_task(unsigned long 
ptr)
dev_kfree_skb_any(skb);
}
 
-   spin_lock_bh(>rx_ring.lock);
-   while ((skb = __skb_dequeue(>rx_compl_q))) {
+   while ((skb = skb_dequeue(>rx_compl_q))) {
resp = (struct htt_resp *)skb->data;
+   spin_lock_bh(>rx_ring.lock);
ath10k_htt_rx_handler(htt, >rx_ind);
+   spin_unlock_bh(>rx_ring.lock);
dev_kfree_skb_any(skb);
}
 
-   while ((skb = __skb_dequeue(>rx_in_ord_compl_q))) {
+   while ((skb = skb_dequeue(>rx_in_ord_compl_q))) {
+   spin_lock_bh(>rx_ring.lock);
ath10k_htt_rx_in_ord_ind(ar, skb);
+   spin_unlock_bh(>rx_ring.lock);
dev_kfree_skb_any(skb);
}
-   spin_unlock_bh(>rx_ring.lock);
 }
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html