Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2752516rwb; Mon, 5 Sep 2022 00:23:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7yzWD4rkzB2n2MxuZVU98mhskskT6hJDZ70LMJa6/Rg2DCC/5kH5XSL752xhmOS4yECq/a X-Received: by 2002:a17:902:d505:b0:175:5313:2a3f with SMTP id b5-20020a170902d50500b0017553132a3fmr22045364plg.70.1662362593185; Mon, 05 Sep 2022 00:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662362593; cv=none; d=google.com; s=arc-20160816; b=xB6MzQv3/BG40W8Fb9EF2elIpKVlMYyGmIsqAGk9SlEIhryeS+nlx2jzcOA4kjLuK2 uoapzKrvyYZnOIeyYzp4S9eKgi/AQL5J19yiWxK+xJJbdb6ZPIQHXJrKFIqY9VPch39q hAbtOkq6ijr2ujjC/nd5swi4xEx4hrvJD8aCmtBypYS5LIuFVxm81F73iLl3l37Sbmh4 +5FSH9ytNeS6PJ1eMMl/nUAe3wnRKMbLQStbBC77Z6yusnxZZmLxxsiaZQsTQzCBSonq CyHsybB0o7t0xq9YFpKBx5Ph/asLP08Cb9Klc8Mh4f13aGemw1NgYP03UUHc3g2UCyX5 o4DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Lit4k172LPPqKfZKQnIWLjpW7f0hx7UeVSrjmXwBCa4=; b=zJpyFOd9pUh8GGQUE8lQVOo2WcKbujKTNVqQm51ka9s6N8LisA9b+gV4GbZ0iZdpIC DbuzMizL4Oy+04Wxj0E4S6OTprkVPs6lSFCxMfPCpnFaYPRKpq7hPnol3FlwbipBavgD G2CkxqnGV/P06YT2uivuN3WAUy47Y04lYe718OVZRYQDz0PCPrEqjaZMR3EJrz9G3/i7 i+5iYFyG9NLjTvavpPcn/dm6gebQUBzS7rggajj1NV7+YHSRLpEGEhMYGxhzJVtXwgtA ohIsqvQYpLZiBhjaIeUUoOMJPvr0COd7MY7WlXOyRC9Y3SGydyWnaBzOgPKEfiuxI3oW LWMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dy4GVS01; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a056a00238400b0052d586f19d5si9996136pfc.183.2022.09.05.00.22.59; Mon, 05 Sep 2022 00:23:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dy4GVS01; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236673AbiIEHWd (ORCPT + 64 others); Mon, 5 Sep 2022 03:22:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237155AbiIEHVt (ORCPT ); Mon, 5 Sep 2022 03:21:49 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9340540BF7 for ; Mon, 5 Sep 2022 00:18:37 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28559FaM007862; Mon, 5 Sep 2022 07:18:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=Lit4k172LPPqKfZKQnIWLjpW7f0hx7UeVSrjmXwBCa4=; b=dy4GVS01SHcazbNCQg4JrIxzav0zTG3aPdW3+jT+K8zhOsB3V6Ec/PPJ5/kN5p8sgZTh EO02Q8mq/2mWx68MtCxwHfEIREKRnk1/JdPminuaEP3l5Z0xDjMMzv4zQSdWWFxBOJfx kQHuoqaeeedbH4aUxn5+wlPj72v024NNPaVgyudzDpY/6oIM/lJEk3Vx5RWvDUv3GP9L PADnA4llCbL+Fkta/ChGuCiLv9ThkwWbAkcx4IdAUvd6BLrysE6YQhRT70COJGuGYsnZ Yw1ICNYKIacr3KTcE2+nSXnxdgm4djdna8iV+ZR9GKKCYh5nZ/RDmVKkcDrJaGEKgsp0 Hg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jbxh73fk9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Sep 2022 07:18:25 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2857IOwX007117 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 5 Sep 2022 07:18:24 GMT 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.986.29; Mon, 5 Sep 2022 00:18:23 -0700 From: Manikanta Pubbisetty To: CC: , Manikanta Pubbisetty Subject: [PATCH v2 1/3] wifi: ath11k: Enable threaded NAPI Date: Mon, 5 Sep 2022 12:48:03 +0530 Message-ID: <20220905071805.31625-2-quic_mpubbise@quicinc.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220905071805.31625-1-quic_mpubbise@quicinc.com> References: <20220905071805.31625-1-quic_mpubbise@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: VFhgTvjZeKiezUZx6hXwBu0xFZqAhoeZ X-Proofpoint-GUID: VFhgTvjZeKiezUZx6hXwBu0xFZqAhoeZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-05_05,2022-09-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 spamscore=0 mlxlogscore=686 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209050035 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Enable threaded NAPI on all ath11k targets. 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 thereby improving throughput. In the case of WCN6750, enabling threaded NAPI has improved 160 MHz RX throughput by nearly 400 Mbps. Similar gains can be expected on other ath11k devices as well. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty --- drivers/net/wireless/ath/ath11k/ahb.c | 1 + drivers/net/wireless/ath/ath11k/pcic.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 29c40c6be5df..a26cdded37ea 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -359,6 +359,7 @@ 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) { + 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/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c index 1adf20ebef27..6e84a8f20bb7 100644 --- a/drivers/net/wireless/ath/ath11k/pcic.c +++ b/drivers/net/wireless/ath/ath11k/pcic.c @@ -414,6 +414,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab) struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; if (!irq_grp->napi_enabled) { + dev_set_threaded(&irq_grp->napi_ndev, true); napi_enable(&irq_grp->napi); irq_grp->napi_enabled = true; } -- 2.37.1