From patchwork Mon May 9 12:25:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 9045961 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 64F3C9FC46 for ; Mon, 9 May 2016 12:24:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8FC6F2012D for ; Mon, 9 May 2016 12:24:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3BE8200F0 for ; Mon, 9 May 2016 12:23:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1azkE0-0005he-Ac; Mon, 09 May 2016 12:23:48 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1azkDx-0005dY-FU for ath10k@lists.infradead.org; Mon, 09 May 2016 12:23:46 +0000 Received: by mail-lf0-x22e.google.com with SMTP id y84so198469942lfc.0 for ; Mon, 09 May 2016 05:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=MGvVFSMAHLa2RjQOcCgrMDmy12bckIB99n9iaLbsocY=; b=vFWvRQfGNnglkJzjyMyL6Hcpdo3b7tdB6vblw0W+sy/55Gc48l1tGepvoK340e9CfS Gg3Hg0aYvpk6ILOp2LzFXGM3K/66G7svPr3PkY7Y1wmK5jtaCEneVfiNfhxOQwSOMja7 Skf0oeXJrgqmrEw08Y6Pv215rXMPyLHBMf+xk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MGvVFSMAHLa2RjQOcCgrMDmy12bckIB99n9iaLbsocY=; b=CwRJ9ZyBgWEKpHRT7FGDBvcMeEX7MUc2YCsUHZfFGnjzKd+fX93r+qJrQVzb3lWy/R WbYiOUp7e1KGwJge/e8NwzcC5pEhwA8460vAOqL2nKaGwPVfm5hg5LrWCatrWPPDG3Az OwG/FI6AYeL3wY6zq67plv8XXWsGYLC8av55kihdPxjlDVP5ngJXiedVbpIGsqoxDyvS b0EJHodhuUSoqgqKHA61r97M9JQOILkeTr1muBFaZ7ON0DtXMYPOrjmCA0Gt4Dpjn3JM kHpulVzZ7ZUXNtbEo+R1/+Xo9DFHyjykSbwBms3mVQMr1auoH7HffC94m0CxMOHurCYA Lb9A== X-Gm-Message-State: AOPr4FWhd2jYBWBnKfRYrfOt6BbtyRzlb9HFM+BWay5qgvY0b/ma7iDdiw94plgUAhS2ckrp719Z5XU2f0IcZbVz9CpYDx87Y0ODThPJYf0PbGyC4wtgFURormujL4/7m60VnwytrJn++fWINMKYJjHS5ewGZ7g4YoKQoKTHzigRdMSVjpuI9Jcbl5VHF5lhTA== X-Received: by 10.112.49.100 with SMTP id t4mr14754587lbn.105.1462796602244; Mon, 09 May 2016 05:23:22 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id m7sm5191512lbr.6.2016.05.09.05.23.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 May 2016 05:23:21 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: improve tx scheduling Date: Mon, 9 May 2016 14:25:08 +0200 Message-Id: <1462796708-13880-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160509_052345_705193_4C9F2A51 X-CRM114-Status: GOOD ( 11.61 ) X-Spam-Score: -2.7 (--) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Michal Kazior MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/net/wireless/ath/ath10k/htt_rx.c | 3 --- drivers/net/wireless/ath/ath10k/mac.c | 7 ++++--- drivers/net/wireless/ath/ath10k/txrx.c | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index cc979a4faeb0..7411b69fde42 100644 --- 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 ath10k *ar, struct sk_buff *skb) 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(unsigned long ptr) dev_kfree_skb_any(skb); } - ath10k_mac_tx_push_pending(ar); - num_mpdus = atomic_read(&htt->num_mpdus_ready); while (num_mpdus) { diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 6dd1d26b357f..1dd415d3c0ee 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3781,6 +3781,9 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar) 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(); @@ -4051,9 +4054,7 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw, 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); } diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 576e7c42ed65..1966c787998b 100644 --- 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_htt *htt, ieee80211_tx_status(htt->ar->hw, msdu); /* we do not own the msdu anymore */ + + ath10k_mac_tx_push_pending(ar); + return 0; }