From patchwork Tue Jul 21 17:14:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Pillai X-Patchwork-Id: 11676277 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2A5D6C1 for ; Tue, 21 Jul 2020 17:15:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B57A620792 for ; Tue, 21 Jul 2020 17:15:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="InQDa9Yk"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="bJpwieta" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B57A620792 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=In9Ab6Hqu84ogQPJfYP8ekcVvjNnBkmb7qJFkX/QXfk=; b=InQDa9YkPxcdJguVnlCGsr/rza Ad3Zl/xdRAQaU1PBdaxQpJ2mBdsEl+r5pKI5U9l28EPQQErrYOmnV6vszKB+YEK3CrpflCIrHv3rP pK67YsDDQRhkxuv3og84xVUWF1DVvJhAUfe38/z54yixLAX2CAklYOLsmeHjwp5BI8FpCZ50sO86H e13NgkAbrz3BOvDgIuHFHaDwGiIh8e9f9Pbgax14tuT0bWXbegZyH1sqLpiiAeuJQpUB6sX8DTRm1 467QeMlyQmAnGY8ynuqIrel1Lnc0qooCkoNyxT1kXOcRZL6yuhXcMLsdE8V7IADu/YQgit5EzWm/z 2l6sE7LQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxvqx-0000Wc-TK; Tue, 21 Jul 2020 17:14:55 +0000 Received: from m43-7.mailgun.net ([69.72.43.7]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxvqu-0000Ul-2h for ath10k@lists.infradead.org; Tue, 21 Jul 2020 17:14:54 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1595351693; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=wHZHpcJq6IQCRL0ELXQS25dwFzpXsMpPaN59eDhrOwE=; b=bJpwietaTkVV1tE2VZ4ZC5iYFYYTyUmUBE65jmTE7VeWigazDYlgOgRmrqMl+FgLwcuLEY4v hE6gC1TkHrY7fWdIkVH75gvk7FsAm4j6ucOvjMpUYP+dQ/N9won4PRT8pzniKFYZ/BiyBQAE 8ucSHipquL3IioW1eooZKwzO1qg= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyJiZDQ3OSIsICJhdGgxMGtAbGlzdHMuaW5mcmFkZWFkLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n15.prod.us-west-2.postgun.com with SMTP id 5f1722833dbcb593a96a70ce (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 21 Jul 2020 17:14:43 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 284EAC433A0; Tue, 21 Jul 2020 17:14:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from pillair-linux.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pillair) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8E2A5C433CB; Tue, 21 Jul 2020 17:14:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8E2A5C433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=pillair@codeaurora.org From: Rakesh Pillai To: ath10k@lists.infradead.org Subject: [RFC 0/7] Add support to process rx packets in thread Date: Tue, 21 Jul 2020 22:44:19 +0530 Message-Id: <1595351666-28193-1-git-send-email-pillair@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_131453_479140_CF4FF6EA X-CRM114-Status: GOOD ( 13.15 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [69.72.43.7 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [69.72.43.7 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, evgreen@chromium.org, dianders@chromium.org, Rakesh Pillai , kuba@kernel.org, johannes@sipsolutions.net, davem@davemloft.net, kvalo@codeaurora.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org NAPI gets scheduled on the CPU core which got the interrupt. The linux scheduler cannot move it to a different core, even if the CPU on which NAPI is running is heavily loaded. This can lead to degraded wifi performance when running traffic at peak data rates. A thread on the other hand can be moved to different CPU cores, if the one on which its running is heavily loaded. During high incoming data traffic, this gives better performance, since the thread can be moved to a less loaded or sometimes even a more powerful CPU core to account for the required CPU performance in order to process the incoming packets. This patch series adds the support to use a high priority thread to process the incoming packets, as opposed to everything being done in NAPI context. The rx thread can be enabled by using a module parameter when loading the ath10k_snoc module. --- This patch series is dependent on the below patch series https://patchwork.kernel.org/project/ath10k/list/?series=315759 Rakesh Pillai (7): mac80211: Add check for napi handle before WARN_ON ath10k: Add support to process rx packet in thread ath10k: Add module param to enable rx thread ath10k: Do not exhaust budget on process tx completion ath10k: Handle the rx packet processing in thread ath10k: Add deliver to stack from thread context ath10k: Handle rx thread suspend and resume drivers/net/wireless/ath/ath10k/core.c | 64 +++++++++++++++++++ drivers/net/wireless/ath/ath10k/core.h | 33 ++++++++++ drivers/net/wireless/ath/ath10k/htt.h | 2 + drivers/net/wireless/ath/ath10k/htt_rx.c | 66 ++++++++++++++----- drivers/net/wireless/ath/ath10k/snoc.c | 105 ++++++++++++++++++++++++++++++- net/mac80211/rx.c | 2 +- 6 files changed, 253 insertions(+), 19 deletions(-)