Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp390658lql; Mon, 11 Mar 2024 06:05:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlYvfuCAuxZ54A2gl1yA121NUlAo1jnDoJem9zST0AwSwDTYh6GtsCIbzfmSiNPxRGIu7iOwcSPgS+pT/ZprDrB42VSxHL9CYWxrc7vg== X-Google-Smtp-Source: AGHT+IHxijoBHZFfQiLU88cptZskzusTHzYTmzhjIGJXOjz5BjJnyrixEc2AFyJPYccLAtWpKwVl X-Received: by 2002:a50:c30d:0:b0:565:cc2d:533 with SMTP id a13-20020a50c30d000000b00565cc2d0533mr4364263edb.1.1710162358911; Mon, 11 Mar 2024 06:05:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710162358; cv=pass; d=google.com; s=arc-20160816; b=JNTytoIQdL8DaLFtTmzj9Sa14NnS5s2OuoBFMXRSLqKJ2pJdKUIKqz9g2F2n47chfE 3mZSSHKTRLwgiRRNXT11Vbzlf1x3rDcZKxt+y9bZCqdqQiDUAc04FYvZsUtZwPb5rJRf ce+oukcu7atdovypgNJ8PVavnRECjjGwKeKRV1pAcSp+2aPxQ7/uCOJBgeXAj7lUBlUF lO7yZtJ6hLj+kxuwWFyPPVVnBd4lMG6seHWpUc2YvZr8si75YrfcMzQHjyOETurhqa3V pDrTfrZORXoKzu1JOAAprNjWncTuSJAmhr2NFnH90UC9+Mp/7GisPYy8tRGZdgF9bWVg +1KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=u+Xt8O4vmePKh/fBWlGJeijvIz2vZKeNzUkEHvxDdVQ=; fh=gNywOoGH9FiEKkqPngRyqJ0mvecwQizKE+QEYR6/Bdw=; b=kdHlIam6Whleni6Uup1shXPYS8K1vFZVedK0NzVP4jneNDDKL3TA5TzWJSsQHia7Q/ TdOk5cpZzQCqT1noZQZVECcxJYpzORAdaz02Sinu9FZEZWVr1/Mv8FCvjtr7gisr/ThA jqCAlPpNrB0RJLGli6HCcyV2QhxwNNToqKudTaaU4RaycMXAw0CRjcA8wdPqHtdsefl6 I9gdcFcrroz6DsfmYadGHTW70OfDXzaOqjEmNubmOo85P/4UEexWfijXLqEvQcWMF/0P NkjDpj8Nm5AkzvgV7YnyaO9YTojwfUKUkBoUEiZH4ruig6aLdYgAIBmYYstZMMd5ZqkQ 53MA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jXRZwXFN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4560-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a22-20020a05640213d600b005683649d2f1si2467291edx.43.2024.03.11.06.05.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 06:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4560-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jXRZwXFN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4560-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 97E5C1F21CD3 for ; Mon, 11 Mar 2024 13:05:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D88438F9C; Mon, 11 Mar 2024 13:05:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jXRZwXFN" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EC27B33070 for ; Mon, 11 Mar 2024 13:05:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710162355; cv=none; b=qdOCmGsz85+J6e2CFbne+Ys/P4Rl2zLB0NElIX30kRp0VeHbwxEIk7da2WWvzXLlEoCFDF9f8izd2aNrTMk+xZp6R+4AYNz8Mm8/DhSskXSVmfSmA3JSPH9Qs9Hj9gjhJzjZc17ZAv9nQLeWS0s4Zrv8xsUKXLxvw24df/fe0zI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710162355; c=relaxed/simple; bh=sY2aZjoVcuD10saQ+X4Mufz+T7UFLiCtz8ISoPvBb6o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=cNsiheF3NpJvE9JvcGPk2FWA4lJqeuEk55+RwKDGYgyh+kQ4b/NRH9gULEpAsgX3LBiv+8Ww4aRnNj3/lC6ZJ0NpRPWZUI8RxpA3jFojLJqhpsyrDHQM5a0mvzwgt4Snx38KY26Kd+IKxBXK0NgSTVppjoo7HbNmJjM5y5fY/ik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jXRZwXFN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FD78C433F1; Mon, 11 Mar 2024 13:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710162354; bh=sY2aZjoVcuD10saQ+X4Mufz+T7UFLiCtz8ISoPvBb6o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jXRZwXFNS3Ur55NfAET7PVqXesG1NUU3SDI/9RZAltqgpakO/kbF2ajVfls1mAAhI S8poL8faVGFYlh8IlBXPBjC6g/zORsaWzhx8evzeMOuR5vy6bX1jxkuDyqygQSh/es RAP6NcX717wu+kNSNzT6hKHHCzlo7uQhcC8/UzJGarCqrCTfcLDPdG1BxtcElEPyPU 7Juac/cLfso9pA0hQe56iHZH3jWKuOJxq3KZq3rhVuZUKM2iEZiSDqfcW6j4FxolyP eGDpwjHyYSRarZxioLNWp9z1FCRp2xesDtrD5LrQ/wxEPEWa7x2/dEPz+F/NPp/Fw8 tQfkMkCpKyYMQ== From: Kalle Valo To: Karthikeyan Periyasamy Cc: , Subject: Re: [PATCH 2/3] wifi: ath12k: Optimize the lock contention of used list in Rx data path References: <20240226162310.629162-1-quic_periyasa@quicinc.com> <20240226162310.629162-3-quic_periyasa@quicinc.com> Date: Mon, 11 Mar 2024 15:05:51 +0200 In-Reply-To: <20240226162310.629162-3-quic_periyasa@quicinc.com> (Karthikeyan Periyasamy's message of "Mon, 26 Feb 2024 21:53:09 +0530") Message-ID: <87msr4gbps.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Karthikeyan Periyasamy writes: > 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 Before looking at this in detail: When optimising something it would be good to have before and after numbers showing the improvement. Otherwise it's just wishful thinking. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches