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: 9045951 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@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 8DD339F1C3 for ; Mon, 9 May 2016 12:23:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6FE82012D for ; Mon, 9 May 2016 12:23:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB7EA200ED for ; Mon, 9 May 2016 12:23:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752609AbcEIMXZ (ORCPT ); Mon, 9 May 2016 08:23:25 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:36359 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbcEIMXY (ORCPT ); Mon, 9 May 2016 08:23:24 -0400 Received: by mail-lf0-f43.google.com with SMTP id u64so198358828lff.3 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=HwOfXyMhpQbzix0rYITtPiXVnzKChtASldjjkr44aJAn1+Oh8YLY4ME1natjutUdyX NCooPlalK5vPZNzOMVcyAiN3jjdvfAdIYqligzBTYQbd+S6D00pgxnCczzrUojATImAx YnS8oq4oO7t0k5ML/aMLF6hi/6At115J47BFWGNnKcHyr0jZnA+dx6EPZNSje5KBJPTZ mfEtf2bFyjCjPXcfCIFRJkxVZ5fz+h4RjPc7N8ZrNrBRaVfWU/y6M5jVVCRpdAm3s08J g9lR/oFAgkS6lcyJQiEDDxv5/wzAKZ/WvldwFMQQAmMEmF2PQl/9khqyVz/4IIOArsTP KQpg== X-Gm-Message-State: AOPr4FVgj9KUKgtVqmW00so2yHdaPZntrHo+v1BmtemtBv1/xBHgHeSGOs52ucX/0zVSEUwdc2A1IldnI1xjvsb3KuohwJm5nLyWbi28fB1GOG53wR1o5gRllSZ7hhcnfMNETBxeiwLVIA== 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 Cc: linux-wireless@vger.kernel.org, Michal Kazior 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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; }