Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5980170pxb; Thu, 27 Jan 2022 04:01:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyu3XV1sHT6T2yUikfipw7/h5ft4YrSkYIC4klTTUzD80Eqb+cgWsGbCFm+Vb4pr9O9UXHk X-Received: by 2002:a17:90a:c682:: with SMTP id n2mr13841621pjt.177.1643284898410; Thu, 27 Jan 2022 04:01:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643284898; cv=none; d=google.com; s=arc-20160816; b=DgXgUF8rTHGV3tmm2q6zPLwD075WRf7neEwRnisQNHFYGwxA5VHlTns6160g2fkom+ b6y4w6liMnNYAH0XYj3Ki9hVAK+eSBBpRHJneuDuP1bedG5+DcT3CcCpgFwMpUIZpS70 b0TDQU+RxtoxydlMt66KxvyXtCw/pca0RLVlPKSsGq4HdvDM3Yf1JyyqT3eEYpRD0HXm H8zPTo5CeLbBX11Ct4FwvshiQ27UxjLIbc7sEooJKKTYQP0quxwQHT5d0CUMsJKzb7ro zWuxDGmWI3888ApN9FJoNjwZXLkOUKDtPSrxZn9AR0/zajBOkOR1imKssKfFikDhCPGH ic/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=r71iHHJZT83gDisJ2i6sLgN1YHMGs5Z8too8sVzWT2M=; b=VGwMTUTpbxLWxPlbkNDB/zWfFLlzdEr9M3hCJ1nLqHFFRH7G1Tjlc2BXJf3oZgeSaU 6//MbvqPuFJWBMTzYzoKTVFPN0NRiKFhfvIwLgTD2EldPSGtbIQCZ9Z85MDZ7l+Rg/sY PHrVkd7sKHc/ANjRvapAcdB2UOLL9+ekypj8rdr8Kd0NbVR1IY6SBEN4lCJg3rkf8by5 QY7N5Bknjf48+axwcrfgmyP40EGEnqqluIM8JhDcr0ZRPg5i6v8zXGFuQXu7wzajR+cb g/QSjXHP2nc/xDcmrcha0nMjDNHzj4yxKGrrXrWOsmvJACtxJoee1leVo25GsPaweSQb 5//A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=wKrHJqeL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k71si2002054pga.357.2022.01.27.04.01.28; Thu, 27 Jan 2022 04:01:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=wKrHJqeL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236272AbiA0Fdy (ORCPT + 72 others); Thu, 27 Jan 2022 00:33:54 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:53591 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233121AbiA0Fdx (ORCPT ); Thu, 27 Jan 2022 00:33:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1643261633; x=1674797633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=r71iHHJZT83gDisJ2i6sLgN1YHMGs5Z8too8sVzWT2M=; b=wKrHJqeLUkgq2UYBtZaXkPorRyv+YeBX/KftTAQ7gU0m+NTsAbLqE49f zBQc5oQ7D68CeVWcXOxtiWm66RPg3NHJoGpqLSJDd6QFIwX0pln+EhHcY JgEcUKc3PthlgtylXgJdhrUnJUgiHeM+sndfIKXCcoGcjGgNqKTt58e5A I=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 26 Jan 2022 21:33:53 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 21:33:53 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 26 Jan 2022 21:33:53 -0800 Received: from mpubbise-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 26 Jan 2022 21:33:51 -0800 From: Manikanta Pubbisetty To: CC: , Manikanta Pubbisetty Subject: [PATCH RFC 5/8] ath11k: Enable threaded NAPI on WCN6750 Date: Thu, 27 Jan 2022 11:03:26 +0530 Message-ID: <1643261609-13500-6-git-send-email-quic_mpubbise@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1643261609-13500-1-git-send-email-quic_mpubbise@quicinc.com> References: <1643261609-13500-1-git-send-email-quic_mpubbise@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Enable threaded NAPI on WCN6750; Unlike traditional NAPI poll which runs in softirq context and on the core which scheduled the NAPI, threaded NAPI makes use of kernel threads which are under direct control of the scheduler and helps in balancing the NAPI processing load across multiple CPUs, this helps in improving throughput. In the case of WCN6750, enabling threaded NAPI has improved 160Mhz RX throughput by nearly 400Mbps. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00573-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty --- drivers/net/wireless/ath/ath11k/ahb.c | 2 ++ drivers/net/wireless/ath/ath11k/core.c | 7 +++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/pci_cmn.c | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 4301f62..fd3bb43 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -331,6 +331,8 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab) struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; if (!irq_grp->napi_enabled) { + if (ab->hw_params.threaded_napi) + dev_set_threaded(&irq_grp->napi_ndev, true); napi_enable(&irq_grp->napi); irq_grp->napi_enabled = true; } diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 643f655..161bddf 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -99,6 +99,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = false, .fw_wmi_diag_event = false, .non_wow_suspend = false, + .threaded_napi = false, }, { .hw_rev = ATH11K_HW_IPQ6018_HW10, @@ -164,6 +165,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = false, .fw_wmi_diag_event = false, .non_wow_suspend = false, + .threaded_napi = false, }, { .name = "qca6390 hw2.0", @@ -228,6 +230,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = true, .fw_wmi_diag_event = true, .non_wow_suspend = false, + .threaded_napi = false, }, { .name = "qcn9074 hw1.0", @@ -292,6 +295,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = false, .fw_wmi_diag_event = false, .non_wow_suspend = false, + .threaded_napi = false, }, { .name = "wcn6855 hw2.0", @@ -356,6 +360,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = true, .fw_wmi_diag_event = true, .non_wow_suspend = false, + .threaded_napi = false, }, { .name = "wcn6855 hw2.1", @@ -419,6 +424,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = true, .fw_wmi_diag_event = true, .non_wow_suspend = false, + .threaded_napi = false, }, { .name = "wcn6750 hw1.0", @@ -482,6 +488,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .supports_rssi_stats = true, .fw_wmi_diag_event = false, .non_wow_suspend = true, + .threaded_napi = true, }, }; diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h index ed4b72b..d33b9b7 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -194,6 +194,7 @@ struct ath11k_hw_params { bool fw_wmi_diag_event; bool non_wow_suspend; bool cold_boot_fw_restart; + bool threaded_napi; }; struct ath11k_hw_ops { diff --git a/drivers/net/wireless/ath/ath11k/pci_cmn.c b/drivers/net/wireless/ath/ath11k/pci_cmn.c index 047fcd7..6550f7c 100644 --- a/drivers/net/wireless/ath/ath11k/pci_cmn.c +++ b/drivers/net/wireless/ath/ath11k/pci_cmn.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved. */ #include "core.h" @@ -425,6 +425,8 @@ void ath11k_pci_ext_irq_enable(struct ath11k_base *ab) struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; if (!irq_grp->napi_enabled) { + if (ab->hw_params.threaded_napi) + dev_set_threaded(&irq_grp->napi_ndev, true); napi_enable(&irq_grp->napi); irq_grp->napi_enabled = true; } -- 2.7.4