Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1487478rbb; Mon, 26 Feb 2024 10:44:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVIIkpIzLqxnL2mIvKnsIAkNYMKv7zkvJsaeThQ0BoiSja1qGwSQKxCx5LanFVUr9bWB/oA+0uV5m6V5Mk7JvUH6fN05quADZ5G72d2RQ== X-Google-Smtp-Source: AGHT+IGNlTydZBWLeLUGCoaADE0dWwcXf7tul3xEM5jB25dwNspXwqfWjgTip9f3lF5aIbQJ8Cui X-Received: by 2002:a17:906:2998:b0:a43:9063:6420 with SMTP id x24-20020a170906299800b00a4390636420mr659162eje.13.1708973095671; Mon, 26 Feb 2024 10:44:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708973095; cv=pass; d=google.com; s=arc-20160816; b=SYjh2b9rTVZKDtRpTmlcqsKgx+BJhxwBNlcRsT9Z2sCAedJb2oIFF2AB3/2plhI42b Z+vNID6v8qGlg1HIx1phdy5TYz5W6+JMtkTLgUA59Ju3XawHlIjA6GD7dju01GaMs3mc EHD/N5fxwHdYcJgxPkQ9I5klQ3FFs1RYo+2LiHf8nQ4UMR16VIRwOEQQYyk0zHthaLbu X8FiQ3lA2q5+IJJpW6zgP4EeOxTDDk1d/BnMg6PVVebhlw/Zk751BOptTt3BNoKGZt57 uP7Vns5KFcs5gE7//2Bj7HuKMdj3klJjbwfj4AKroPgOoW66kvheT3pdktE0VYdGahXt DW4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=8y56Vqz7EzQFsk6AFROBHk0EWX4p6Ci4GcFeTw74m7g=; fh=H1n+MC6g7LKUTwELnEK0g4ZhJk1fR9LyVP/4n5c0PMs=; b=OU63Ho4sk8zAIDFP/pGmq2EvOfkIyR6BBpiFzSYSFzWGVMmTlmYFXrHx2egWwZDmv1 /Kz2g1qa44Q5LEkGYhcU06mjyuiG9qtnZeItJeB+NaBFMyrySehw+94aX1zDf+Smfks/ ih486A7fhvtT0AQ0otm0AeV95RMjh8r/mzimX5Wbs/N2mcGHVbGzWLuD3YmFdYCCDqoK Rv2b1bX21f1uxu5PVXYDdzJqXSn6LGWKIlib6eblA2obaA8y68zGBzDay6eLd9bhhlqL eyLvFY8B92EqPFsD+fv8nhRMpccAxskTVYBXpP0ieJ423vxg9Jvn1Jq5wAoalus/3E6D QANA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cZ0Buhji; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d2-20020a170906544200b00a435397e2d2si8607ejp.937.2024.02.26.10.44.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:44:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cZ0Buhji; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 42B011F276F0 for ; Mon, 26 Feb 2024 18:44:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1344B12DDAB; Mon, 26 Feb 2024 18:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cZ0Buhji" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E2B512E1D5 for ; Mon, 26 Feb 2024 18:44:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708973091; cv=none; b=XPeLzsFUpyJUxssoAP3Tp/VzgObknmEe4Ga+PHhhARKEaUrSxKJ26VJqp0fwcfX7s53smemKR2PzuoOCbMGyV7nlMwfXHtq2U1CJdE3cWpq7cOv+2rMMv+JfhPb8owwDZSY82z+ZxgKChJz0U1DqW0Dt3L0QDW4b9Up37I/Le94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708973091; c=relaxed/simple; bh=Vjf5eqiZ4ijVjlvsDTj2J0lU+TYGtq73GMkXoyEfypk=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Sxvv5ljlXFQwuNhH/S+cJ8x+g0oK17A48MESbW6MQiaHKCsucbA/bkdDt+hBl/iMgp5dDtE0XOmFzXzg7wue/ALlWFZIOWfaHhRoMaA0W2k+c1OzXse5AgWT9AXuNEGWYPwreS5LgSttBXNUiJKzss1vUO0NcvwWFuhC9Bk65yM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=cZ0Buhji; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41QFgxuW026239; Mon, 26 Feb 2024 18:44:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=8y56Vqz7EzQFsk6AFROBHk0EWX4p6Ci4GcFeTw74m7g=; b=cZ 0Buhji/+tgGawZPPK7ByiysF+6uj9nJgBqYwoLVLwaOo+rMRmHm0fZTKL8yJrjLc i3KfWVK7TeIUVFbbL7Yojnd7knUElLs1FhT34ktQFs2WV9U/9+S8+g4r8pEphNGH LDtCkLfOT4K2PVbsX3Lmift3BF2l3TqlpOYqA523Q/okA+PscyIpiy+fndZWOGwG bY/2RTxIVac1UWuZrW3G5GYMJR/7qtdBBHlG2x6I/3y70k7mpom8l/c8lfPvzsi9 02yIg6hxr3G4cHgS8UYaccLsdUuqBtsUI06zW00rBhBPdFIvW4iOMdly/wuUUmZq njebSSsFwz9WaGxrnBOg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wgkxm1sv8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 18:44:45 +0000 (GMT) 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 41QIiiDd011665 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 18:44:44 GMT Received: from [10.227.110.203] (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.1118.40; Mon, 26 Feb 2024 10:44:43 -0800 Message-ID: Date: Mon, 26 Feb 2024 10:44:42 -0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] wifi: ath12k: Optimize the lock contention of used list in Rx data path Content-Language: en-US To: Karthikeyan Periyasamy , CC: References: <20240226162310.629162-1-quic_periyasa@quicinc.com> <20240226162310.629162-3-quic_periyasa@quicinc.com> From: Jeff Johnson In-Reply-To: <20240226162310.629162-3-quic_periyasa@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: 2EX0QoOS-f9ux9be-gZV4tm_hLGVKwfJ X-Proofpoint-GUID: 2EX0QoOS-f9ux9be-gZV4tm_hLGVKwfJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-26_11,2024-02-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 mlxlogscore=455 clxscore=1015 impostorscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402260142 On 2/26/2024 8:23 AM, Karthikeyan Periyasamy wrote: > When a packet arrives in Rx rings, the RX descriptor moves from the used > list to the free list. Then, the rxdma ring gets replenished, where the Rx > descriptor again moves from the free list to the used list. At the end, the > descriptor came to the used list with unnecessary list movement. The > descriptor used list is maintained in the Rxdma ring structure, which > creates lock contention for the list operations (add, delete) in the Rx > data path. Optimize the Rx data path by removing the used list from the > common Rxdma ring and maintain as a local variable in the Rx ring handler > itself, which avoid lock contention. Now, to find the used list descriptor > during descriptor cleanup, we need to check the in_use flag for each Rx > descriptor. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson