310-ath10k-improve-tx-scheduling.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From: Michal Kazior <[email protected]>
  2. Date: Mon, 23 May 2016 23:12:45 +0300
  3. Subject: [PATCH] ath10k: improve tx scheduling
  4. Recent changes revolving around implementing
  5. wake_tx_queue support introduced a significant
  6. performance regressions on some (slower, uni-proc)
  7. systems.
  8. Signed-off-by: Michal Kazior <[email protected]>
  9. Signed-off-by: Kalle Valo <[email protected]>
  10. ---
  11. --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
  12. +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
  13. @@ -2291,7 +2291,6 @@ bool ath10k_htt_t2h_msg_handler(struct a
  14. ath10k_htt_tx_mgmt_dec_pending(htt);
  15. spin_unlock_bh(&htt->tx_lock);
  16. }
  17. - ath10k_mac_tx_push_pending(ar);
  18. break;
  19. }
  20. case HTT_T2H_MSG_TYPE_TX_COMPL_IND:
  21. @@ -2442,8 +2441,6 @@ static void ath10k_htt_txrx_compl_task(u
  22. dev_kfree_skb_any(skb);
  23. }
  24. - ath10k_mac_tx_push_pending(ar);
  25. -
  26. num_mpdus = atomic_read(&htt->num_mpdus_ready);
  27. while (num_mpdus) {
  28. --- a/drivers/net/wireless/ath/ath10k/mac.c
  29. +++ b/drivers/net/wireless/ath/ath10k/mac.c
  30. @@ -3827,6 +3827,9 @@ void ath10k_mac_tx_push_pending(struct a
  31. int ret;
  32. int max;
  33. + if (ar->htt.num_pending_tx >= (ar->htt.max_num_pending_tx / 2))
  34. + return;
  35. +
  36. spin_lock_bh(&ar->txqs_lock);
  37. rcu_read_lock();
  38. @@ -4097,9 +4100,7 @@ static void ath10k_mac_op_wake_tx_queue(
  39. list_add_tail(&artxq->list, &ar->txqs);
  40. spin_unlock_bh(&ar->txqs_lock);
  41. - if (ath10k_mac_tx_can_push(hw, txq))
  42. - tasklet_schedule(&ar->htt.txrx_compl_task);
  43. -
  44. + ath10k_mac_tx_push_pending(ar);
  45. ath10k_htt_tx_txq_update(hw, txq);
  46. }
  47. --- a/drivers/net/wireless/ath/ath10k/txrx.c
  48. +++ b/drivers/net/wireless/ath/ath10k/txrx.c
  49. @@ -117,6 +117,9 @@ int ath10k_txrx_tx_unref(struct ath10k_h
  50. ieee80211_tx_status(htt->ar->hw, msdu);
  51. /* we do not own the msdu anymore */
  52. +
  53. + ath10k_mac_tx_push_pending(ar);
  54. +
  55. return 0;
  56. }