linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	linux-wireless-owner@vger.kernel.org
Subject: Re: [RFC 1/2] ath10k: migrate to mac80211 txq scheduling
Date: Fri, 28 Sep 2018 15:27:35 -0700	[thread overview]
Message-ID: <2548421a777c2223b5b31459222fe1e1@codeaurora.org> (raw)
In-Reply-To: <1538008874-11692-1-git-send-email-rmanohar@codeaurora.org>

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

      parent reply	other threads:[~2018-09-28 22:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27  0:41 [RFC 1/2] ath10k: migrate to mac80211 txq scheduling Rajkumar Manoharan
2018-09-27  0:41 ` [RFC 2/2] ath10k: reporting estimated tx airtime for fairness Rajkumar Manoharan
2018-09-28 15:25   ` Toke Høiland-Jørgensen
2018-09-28 19:47     ` Rajkumar Manoharan
2018-09-28 19:57       ` Ben Greear
2018-09-28 22:47         ` Rajkumar Manoharan
2018-09-28 23:04           ` Ben Greear
2018-09-28 22:27 ` Rajkumar Manoharan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2548421a777c2223b5b31459222fe1e1@codeaurora.org \
    --to=rmanohar@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless-owner@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=toke@toke.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).