From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C4BE4576B for ; Thu, 8 Aug 2024 14:22:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9510F42790; Thu, 8 Aug 2024 14:22:32 +0200 (CEST) Received: from fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) by mails.dpdk.org (Postfix) with ESMTP id 8116240EDD; Thu, 8 Aug 2024 14:22:31 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 0113C1150874; Thu, 8 Aug 2024 08:22:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 08 Aug 2024 08:22:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1723119750; x=1723206150; bh=HAzOFf6hu/splrJcAj9utx/0DXauSfSuK/ZaWnVlwts=; b= gFZrXJgjrwFZhVtfAJOtHZeWDdHEwQenEETQoCV4/JJ7mbm4IAa2L66/rKPepuCM oUG6LtAhB92wQ23LKod8U4hQ4NA8sJ6gUzeETenf4c21Hg0tVXmYN8CQy4zb43bp u4tZ6WtlQqyNF4jZ2P6Ctik3fMBxIvc5yyp5CbYaPlHO6rsHVfQYh3d24HPg1n3Y Lg7AV1t2oewN0KGDtcF0ERYyA4UjdoDS5AIVWAoOlHJoKqYm4L+73mXUgxzfPJKy r5/ue4zDvI94rApKTCyMQX6mRsLLWLVcXcos2R2d3ttA+aFucw4dgoswR7L5c5Xk rOSysgFvVhucpIV27hyqfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723119750; x= 1723206150; bh=HAzOFf6hu/splrJcAj9utx/0DXauSfSuK/ZaWnVlwts=; b=K jCs4Y5MHxdH7QKOkfESwo9kKkOlTu1n7bDCkASvKRm06vyGbcn7iI0ycjq1kxDfW TPiJx6UUfMEG2veRc1B1TZiScKA9L6KN3KmhpfVaFR3LQl6mlQseS4pxEJsX1xll fqazv8bx+vnXVWMJRwaqcHliA7Duhu0ZDDjhe6ZBFTZvNyn4Pz5Wap7yEQ1DbMIr E4hbzWh8kCRpFpC39XiPoJGqV/FihsZJMeuhlRaM6MbwjUfBrnkwg1WQ1FcIbzgR jNwDvQ9kpNa8eSXxO39YHd3cYoXa3Fl6sFew8ebTpLVtDgKl6Ne9Mkqp2dr9kJbw DZiaXHr5YaOynmO7PEHKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrledvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecu hfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlh honhdrnhgvtheqnecuggftrfgrthhtvghrnhepgedttdeljeejgeffkeekkedtjeevtdeh vedtkeeivdeuuedvieduvdelveejueejnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgs pghrtghpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhkuhguuh hruhhmrghllhgrsehmrghrvhgvlhhlrdgtohhmpdhrtghpthhtohepfhgvrhhruhhhrdih ihhgihhtsegrmhgurdgtohhmpdhrtghpthhtoheprghnughrvgifrdhrhigstghhvghnkh hosehokhhtvghtlhgrsghsrdhruhdprhgtphhtthhopehorhhikhgrsehnvhhiughirgdr tghomhdprhgtphhtthhopeguvghvseguphgukhdrohhrghdprhgtphhtthhopehjvghrih hnjhesmhgrrhhvvghllhdrtghomhdprhgtphhtthhopehnuggrsghilhhpuhhrrghmsehm rghrvhgvlhhlrdgtohhmpdhrtghpthhtohepshhtrggslhgvseguphgukhdrohhrgh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Aug 2024 08:22:29 -0400 (EDT) From: Thomas Monjalon To: Rakesh Kudurumalla Cc: "ferruh.yigit@amd.com" , "andrew.rybchenko@oktetlabs.ru" , "orika@nvidia.com" , "dev@dpdk.org" , Jerin Jacob , Nithin Kumar Dabilpuram , "stable@dpdk.org" Subject: Re: [EXTERNAL] Re: [PATCH v3 1/1] examples/l2fwd-jobstats: fix lock availability Date: Thu, 08 Aug 2024 14:22:28 +0200 Message-ID: <16895939.geO5KgaWL5@thomas> In-Reply-To: References: <20240729061026.3729690-1-rkudurumalla@marvell.com> <2648204.9Mp67QZiUf@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 08/08/2024 13:41, Rakesh Kudurumalla: >=20 > From: Thomas Monjalon > Sent: Tuesday, July 30, 2024 9:42 PM > To: Rakesh Kudurumalla > Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; orika@nvidia.com= ; dev@dpdk.org; Jerin Jacob ; Nithin Kumar Dabilpuram <= ndabilpuram@marvell.com>; stable@dpdk.org > Subject: [EXTERNAL] Re: [PATCH v3 1/1] examples/l2fwd-jobstats: fix lock = availability >=20 > Hello, 30/07/2024 12:=E2=80=8A03, Rakesh Kudurumalla: > This patch addres= ses the issue by introducing a delay Please start with describing the issue= =2E > before acquiring the lock in the loop. This delay allows for better >= availability of the >=20 >=20 > Hello, >=20 >=20 >=20 > 30/07/2024 12:03, Rakesh Kudurumalla: >=20 > > This patch addresses the issue by introducing a delay >=20 >=20 >=20 > Please start with describing the issue. You should explain the race is managed with a spinlock, and where the threads are running (one is a timer). > > before acquiring the lock in the loop. This delay allows for better > > availability of the lock, ensuring that show_lcore_stats() can > > periodically update the statistics even when forwarding jobs are runnin= g. >=20 >=20 > Why a delay is better than a pause? >=20 >=20 > due to high frequency of polling in l2fwd_main_loop() rte_pause() is not= yieding the processor > to display stats relating to fwd and flush execution time so added a dela= y achieve the same. Which CPU did you try?