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 7B6C44576A; Thu, 8 Aug 2024 13:41:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 462A142790; Thu, 8 Aug 2024 13:41:47 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 48DAE40EDD; Thu, 8 Aug 2024 13:41:45 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4788KYJW009193; Thu, 8 Aug 2024 04:41:42 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2043.outbound.protection.outlook.com [104.47.66.43]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 40vtdugmvn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Aug 2024 04:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BUODPNqGV7sNpmU8v3+XvvLHDCZzEfpoX64FJkuRMnplu5AlQZFKGf99deXNCmIOVrdpp6b47LuTfm/NugG6TODyoSrgaPD4UwS7kMEBoP4HeOK2b+vswBOPgCP6xMunlaOgVnsaOR1LPzqKxs6QGQL74+Vy2d6Fo4MSvpu4NQUOaHXmHc6IGqc6PnpY6V4ALXWLKCJl3BLa2n+T0nmxAPSaICq19y/CYi7/87bTNFLLAnDMd8gFGjEYmd0ZlYa1IZnZ6AydvBAIvCknsC9AQq6xlm1Cwg2vf5Md8rM4Su+szS25WaUczHGqvnWo19FObWGl6wTce5g1EoVTQyDC2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Uc4Y2XznGNzd/T2kO24dwtDba0cYlQM+K7+foSXw3ps=; b=QZjg53jNm2L1Olxp+gux/Zg2gj2wkHfQAuOz6KlSAhBGMxR6LFAbindnjdLrBjhtC8830wYVlmbEr6IfgO3mx8/XC5MGl7Fve7DJ6ia5aW6Eb2MruqEqPmO+xi2RMFkUz6kl9fidXS1eaLnEjjTVMdHgqn1H9DBO5L4Sx1qWYEKKDj+y1nwI/zXzUVqBl5Bb1BMgfBP4x+TgWj3oyozfyS+ZKb4ZSJ3usjE7TETG/yJHTHv4kEb4UA9ZTGlCaI1CahHVKAe6MLlEdFurWYF0ATmMVZxAwQz4RoL7e1zlYcRS52Kj77W6l054TBGXuY23vPf9A6pmKJB28eR6wHFJrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Uc4Y2XznGNzd/T2kO24dwtDba0cYlQM+K7+foSXw3ps=; b=NUw9GDd2cfb1evT3qOLIwxRQNnqfw2jQMNFW+i+4KP6onvPAasHyAIl/czf7vQ3QCP9ZG4ET2sgCiIQAyv4FqhkXQtG/j9Xrx8y5cAZjIWTDhuj56aiHGWpMLbO2cNUrtQj2lnuKhjrW12z3gTl3hhhpg8qpQtaNy4CvZtw3f+8= Received: from DM4PR18MB4255.namprd18.prod.outlook.com (2603:10b6:5:396::17) by LV3PR18MB5566.namprd18.prod.outlook.com (2603:10b6:408:1a1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.14; Thu, 8 Aug 2024 11:41:38 +0000 Received: from DM4PR18MB4255.namprd18.prod.outlook.com ([fe80::9060:7014:db69:ca1c]) by DM4PR18MB4255.namprd18.prod.outlook.com ([fe80::9060:7014:db69:ca1c%4]) with mapi id 15.20.7849.014; Thu, 8 Aug 2024 11:41:38 +0000 From: Rakesh Kudurumalla To: Thomas Monjalon 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 Thread-Topic: [EXTERNAL] Re: [PATCH v3 1/1] examples/l2fwd-jobstats: fix lock availability Thread-Index: AQHa4mfE8KjoH2CUikuMCBo4ubmnxLIPcbIAgA3VwIA= Date: Thu, 8 Aug 2024 11:41:38 +0000 Message-ID: References: <20240729061026.3729690-1-rkudurumalla@marvell.com> <20240730100335.3734796-1-rkudurumalla@marvell.com> <2648204.9Mp67QZiUf@thomas> In-Reply-To: <2648204.9Mp67QZiUf@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR18MB4255:EE_|LV3PR18MB5566:EE_ x-ms-office365-filtering-correlation-id: c29ce43c-1c95-4112-2b22-08dcb79f107c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?UDNZbG5NY0gzb1ZRaWtzUm1JeEw1SHdBWDJHK3BwV3M0d2hDK0NTc0ZoeWFZ?= =?utf-8?B?QmpZVER2YUtaaHdSR2R0Ri85MDhzcktWUElxR2FXdnI4WUZRek1aQmplTzJW?= =?utf-8?B?RENINWxXSWRobmpCNkRHcUx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?SkhpejlyMVE3cG44dXF0YjQ2eFAzc3FVYmgxK0srcHhHK2EwOUFYajJVY2d6?= =?utf-8?B?emJGdzA1bFkrYTZ6aExXL3hBSHEwUGhsT2Zva1Ivb2FaS0lJYnE4emxHR1RY?= =?utf-8?B?T25hMWlnbC9BUmxVcmxhV0ExYnpxSWtvcDYvTVZuRysrelN4WGttb1pveVhB?= =?utf-8?B?NjB0NlhiYkxVSDR5SklIZVFqUm13TlZkZStVMXFycVMySUNPZnZRQ1VzbXZH?= =?utf-8?B?NUZsMGlBazBPL2pMZUJZdEQ0MEFCNGF5TlRTSm4rWUU5TG8xbDJDMDNVQkg3?= =?utf-8?B?eUwvQ0g5ZHdDYW01YVJSa2ZCdksxejFZazVTRjRERUczMnhVZWdKdXRqMktx?= =?utf-8?B?T3ducFFQZVNCdEhnS2V2TzIrOFBBVHpYM01ZTUJCeXdnWVdqY2Z2WDM1VzNK?= =?utf-8?B?aXV2bTBGNWJQYVl3WWRZUTBTV0Y3cGZvS0dkeXhkUTJRb090QVh5dVBvWmJK?= =?utf-8?B?ZDRzcWRObVFuZ2JBeC9RMm0xRWFCNDk0eUZZMlE2cUh6eTFQbkE0MUhoa1N2?= =?utf-8?B?TGZvYmhnVkZjQnMyZGgwd08yY2hEWGlyQXpMU2NlUHlXdU9GaDZXL1M3eHBs?= =?utf-8?B?cm16Rk9ab0JpOXJNMHVWaW5jajVTbWtwYXIxZmpXclRSOEswQitOMVJPSGNk?= =?utf-8?B?NmdJNDFjdm9GQ09TTGhrVHhURE90VVllRlpPVDVzalYxbHVhVlFhSDQ5d2wx?= =?utf-8?B?cS9vK093NkhJaHNkZmpZamJEUTJKK210anhRRHZoWXZiek9BM2lkRGlkOW54?= =?utf-8?Q?TLc3RK6wdzK0TsO0W2RRyUXJCt2POY+vq2PCk=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR18MB4255.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?TEkvbjlSRFNwUVZGV2V1SE1LYmN2NW1JVFQ2SUtGMEFZMUk5MU9JSVM2WEZZ?= =?utf-8?B?SnpScE02SHBTc1k5RE1zdW0xaEx2Z0llR0NJSEQxK2RJNWZ1OER0djhGeWFX?= =?utf-8?B?RWlpN1grU29qTFVPT05SVko5TmJrbjZEdVFtZFQ5QUV2VUthcG5YOHh6bllp?= =?utf-8?B?MGtKYXpTTldwYTVZTWIwLzdPcFBVTTRwUTRMd2VQR3JrcmR1c2RvbE9Ka2pS?= =?utf-8?B?cTN4TEQvSzRJdDRZOVdVYUhYRklwcTh4cUdnd3BGSGdvcnFkdk9GYkdqOVR6?= =?utf-8?B?VFVyNkcwTnR0THNia2kvaloxL21GTnhtVUt3QWRCRERLeTZmc21mQXRTZ01h?= =?utf-8?B?dUtGWVdKR09SWmRBckU4clFWdjdlbFpOSjhyMGVUOVBVUUtTMHY2UHdXb0tm?= =?utf-8?B?dFh6bjFyUTF0L2lZaUZGWktHVzFwbkd5YzZ1Mk1RRm95cVg5aXZQK3lQcS9x?= =?utf-8?B?VWZaSXpqeXVRRFl5alJIa09TaS9RbklzL3pjV2wycktEejFuektMSkhNbGR3?= =?utf-8?B?M0VlYVc5eDNJdUsvZVJkMTNMZFA2U1JnTEhlRFJrRVhESjVlV2kzVkRPQWpY?= =?utf-8?B?ZTlrcU5IYStST1RpTFZUS0FHR3Q4MkhvTUtoN3dPbmdlYnp3TnhiWU5pamdE?= =?utf-8?B?OW5hdU56UmNySFdCL3NBSUkwd241aUF0TFpLc1JXeEpTd24rRDRYV3lBT3c3?= =?utf-8?B?cnN5Q0I1R293QUlXbFltbWFZSHM2L2xBdi81eGtrMjBJYS9ydGNtQlcrbjRO?= =?utf-8?B?RmV0OExnM1BwbnQwT0JXZkR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rNmpDeS93WGEvR3pqSVJOYTdyOHE0aVFXM3BmcFlOQmwydEcrR3o4?= =?utf-8?B?bFZFWFhsTVNaV3Z4UHVYREdnSGE0RGtKWGJNbmRBcXh5NFVJa3QvV1YxbG1L?= =?utf-8?B?bHhpMDUvNDBIUGMySnBJVnpYNUwzbHdjZ0huQWtqc2MrazlpYXI4dVp5RThh?= =?utf-8?B?bDdwbHVTNDZoOFZJeVFSTnZQWVA0eW5SWGJTM3FXR3cyV09lWEZnVGk4TG5m?= =?utf-8?B?N1RyMXhzcjVNWHE5aS8randHU3B2VXAyYTNqa2hLQm11RWcvcFA2ZnhnRzNp?= =?utf-8?B?ZC96VHdUSWRRUVVWZElJL2Q0dkM1dS96Y3R4dDVudk5xMmY1bXExcWE0NlMw?= =?utf-8?B?cUFwa3pIOWxIM25ZZUlhbk9FdXAzVEpYTEVzRXdORCtkbEgyK1ZrZllTRUFT?= =?utf-8?Q?SDK+DtIWjJnskRm3R5MXGZnhd?= Content-Type: multipart/alternative; boundary="_000_DM4PR18MB4255270C0335707BD060E143CFB92DM4PR18MB4255namp_" MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR18MB4255.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c29ce43c-1c95-4112-2b22-08dcb79f107c X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2024 11:41:38.3814 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: o+NTW/p8ygcRkyPLNFPjLj1H99IqbgPW37XbFsFmo/yCgVzxYvNuU/YhGGR4QNwMYVqIoBX9glFhk2hP6XT0NkeSXvh+m3E4QH4U6IE9AXQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR18MB5566 X-Proofpoint-ORIG-GUID: aGLEnh3qOz1fBNxtua68cZQPGw7MxQKX X-Proofpoint-GUID: aGLEnh3qOz1fBNxtua68cZQPGw7MxQKX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-08_11,2024-08-07_01,2024-05-17_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --_000_DM4PR18MB4255270C0335707BD060E143CFB92DM4PR18MB4255namp_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 ; stable@dpdk.org Subject: [EXTERNAL] Re: [PATCH v3 1/1] examples/l2fwd-jobstats: fix lock av= ailability Hello, 30/07/2024 12:=E2=80=8A03, Rakesh Kudurumalla: > This patch addresse= s the issue by introducing a delay Please start with describing the issue. = > before acquiring the lock in the loop. This delay allows for better > ava= ilability of the Hello, 30/07/2024 12:03, Rakesh Kudurumalla: > This patch addresses the issue by introducing a delay Please start with describing the issue. > 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 running. Why a delay is better than a pause? due to high frequency of polling in l2fwd_main_loop() rte_pause() is not y= ieding the processor to display stats relating to fwd and flush execution time so added a delay = achieve the same. > @@ -542,7 +542,7 @@ l2fwd_main_loop(void) > } while (likely(stats_read_pending =3D=3D 0)); > > rte_spinlock_unlock(&qconf->lock); > - rte_pause(); > + rte_delay_us(10); > } --_000_DM4PR18MB4255270C0335707BD060E143CFB92DM4PR18MB4255namp_ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

 

 

From:= Thomas Monjalon <thomas@monjalon.net&g= t;
Sent: Tuesday, July 30, 2024 9:42 PM
To: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; orika@nvidi= a.com; dev@dpdk.org; Jerin Jacob <jerinj@marvell.com>; Nithin Kumar D= abilpuram <ndabilpuram@marvell.com>; stable@dpdk.org
Subject: [EXTERNAL] Re: [PATCH v3 1/1] examples/l2fwd-jobstats: fix = lock availability

 

Hello, 30/07/2024 12:=E2=80=8A03, Rakesh Kuduru= malla: > This patch addresses the issue by introducing a delay Please st= art with describing the issue. > before acquiring the lock in the loop. This delay allows for better > availability of th= e

Hello,
 
30/07/2024 12:03, Rakesh Kudurumalla:
> This patch addresses the issue by introducing a delay
 
Please start with describing the issue.
 
> before acquiring the lock in the loop. This delay allows for bette=
r
> availability of the lock, ensuring that show_lcore_stats() can
> periodically update the statistics even when forwarding jobs are r=
unning.
 
Why a delay is better than a pause?
 
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 =
delay achieve the same.
 
> @@ -542,7 +542,7 @@ l2fwd_main_loop(void)
>            =
            &nb=
sp;  } while (likely(stats_read_pending =3D=3D 0));<=
/pre>
>            =
            &nb=
sp;  rte_spinlock_unlock(&qconf->lock);
> -           =
;             r=
te_pause();
> +           =
;            rte_del=
ay_us(10);
>           }
 
 
 
--_000_DM4PR18MB4255270C0335707BD060E143CFB92DM4PR18MB4255namp_--