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 D0AD7457E1; Fri, 16 Aug 2024 07:27:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A20D4025D; Fri, 16 Aug 2024 07:27:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id BB9DE400EF; Fri, 16 Aug 2024 07:26:35 +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 47G4lre3015605; Thu, 15 Aug 2024 22:25:30 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 412024r49k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Aug 2024 22:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uE215xxFX+K986SLkpKdhaNZuou5s1GoqQ5AP/aK0EJco7hYxBTpTLAMM1x7MSuTWScVCDFNviT5ATuipxrMI4EMsfV5ZmLdGDEK3Z7N0AbaUlLcbe60kh9rLJ/iQgu6RNj7i42IQFevi4RQkj0TlfzHBKmG2+GdL77vDhiD1emJfodZAsbUYBapPGNao6xyIyqj91tgX7nNn4ZKLyRUTvU4Q2W3G74/lpBpJiXBJ4iBQxCcO4XIbmfbIqdxTze1phyZ6XGDYVJXfLH1VmnF/cKNOJUzXOO8hwWLxezy+orszFQ39gC80HCTIBa6isnfiBKxvzwxCDAigYzjSkYK2w== 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=bkUtRfwmrwU+fyHp8W6Gf4B+aKwZ9e7AmZ/29cP9YV8=; b=FcAd+Rz0E4pouTzyXlWIjirl1DYuscP3DSyW1w4BdHNe1cD68YGC6y2P/k84qGmZTC5e4EXNn0lgEr7xMhHQIsI1Vy1xkaEc6z/G9XjKPa33VGvGg8BOH7U+9ckeFsGcdNyKLzOr9q4h5oWJ8RlxdhnN7HnAeg5NdBYYxOls3+BV88Fw6zf/ABgJ39hMKxYfD7e80SdFSUNBIap5pf5woLU1Y3zrrlij4oJXLMOFzm9F+8WqdmwIR9+/+Kx/3UWFbpdMIOl4qqMhs2fOQPqF1BxekYU26Nvrwyi8PMhSCG6KSQpqoopdT8OrN+Fa1jnfIFrjNqNc8yupszMdv5+a4A== 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=bkUtRfwmrwU+fyHp8W6Gf4B+aKwZ9e7AmZ/29cP9YV8=; b=d8g1z6vyR6Z3dqun4zU0+8nqzb5Wycvl6dW7f98u8O+pUokZRlued0M11nGzLMLxZVwiqIDqfhTDeBIBtDUMtxXoooRKXCBxU33v77MerEPOg6Rs9maTp+a+QDK02fUNuOKUBs0j+HkIuVNulZn88wJA6BbFj/Ur6Xdl6oCb954= Received: from DM4PR18MB4255.namprd18.prod.outlook.com (2603:10b6:5:396::17) by DS0PR18MB5269.namprd18.prod.outlook.com (2603:10b6:8:120::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.18; Fri, 16 Aug 2024 05:25:26 +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.7875.018; Fri, 16 Aug 2024 05:25:25 +0000 From: Rakesh Kudurumalla To: Stephen Hemminger CC: "ferruh.yigit@amd.com" , "andrew.rybchenko@oktetlabs.ru" , "orika@nvidia.com" , "thomas@monjalon.net" , "dev@dpdk.org" , Jerin Jacob , Nithin Kumar Dabilpuram , "stable@dpdk.org" Subject: RE: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability Thread-Topic: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability Thread-Index: AQHa7AeKprgkBtY9/ke7CCtlF8mKCbIiO9GAgAclClA= Date: Fri, 16 Aug 2024 05:25:24 +0000 Message-ID: References: <20240811065819.575759-1-rkudurumalla@marvell.com> <20240811155957.576645-1-rkudurumalla@marvell.com> <20240811091719.37512e55@hermes.local> In-Reply-To: <20240811091719.37512e55@hermes.local> 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_|DS0PR18MB5269:EE_ x-ms-office365-filtering-correlation-id: 5fe0d1df-d5f6-4eab-20b1-08dcbdb3d485 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?M1ZQd3BaYXpCa2tLRElDSDh3MU5tb3ptQ28yZHJrc3BOdW1TL2ViR0RJS0dC?= =?utf-8?B?cEZZZ3JhRi9BckFIUjY4NmZINFQ3U04rSGJLREtDTzlubHJhUW15cVh4dlZS?= =?utf-8?B?eHpEZmJnVTdkSzhodm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= 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)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UkVvL3pHSUN3SWdodUhvd01iYzZnWExiZjczOHM2TmhUaVpuQUEwQmU4THpU?= =?utf-8?B?ODNJdGN5MGdOMG1HOFZoVWxHMDBPTjFqQjE4ZlZSTitRSE9TTzNGTGlQTFh1?= =?utf-8?B?YkkvQ3BmRU56WmtrSTk4OHI2L2M0clROUklRckNQSjE5eGF0c3JXTjFGbGN5?= =?utf-8?B?cVRMbHV2UE0vcUpRNWRTeDV6V3htMENPR244VVhqT0xpMWIxVUlrM1l1cjNF?= =?utf-8?B?RENnRDBtb012UkFhcVlhR29yamVFWWFKWk9GMzR0eGFvcVMyRU5NNlppbFRG?= =?utf-8?B?WVVEMlYyZFVDZHVGTSs4VktnUS8xT2VnOE9RWWVlZ09QQWJibjArS1ViWjNx?= =?utf-8?B?RkdtRVlyY2lKVG91aG1uY0xrejFTS1A5K1JtUmU1c1RlMWxCQVJzUy9mMzlB?= =?utf-8?B?cHA5YUpNc1VzRzArSktUUnBQUDlvbG1nNnZxMnJENElXYXRUaEtxZjlkOXFi?= =?utf-8?B?WVlnVlAwUXMzSDdRNThpdDZQa21yS2RRUkgxKytWdFBnVFhjSnA5TG14SklZ?= =?utf-8?B?YXJHYStpTnF5c0toZDM4NXVXbHNiaW5aajR1bnRaS3FEQnd5elNJY2tSeXE0?= =?utf-8?B?WHIxbVEyQ1ZyRlFRV0lzeGowWW53cGRCY2MrT21zVStOOE9RaGZGcThvbThw?= =?utf-8?B?TmdYR3pac251NlNib1M0THhOem9JQWpqTnBRd3p5bWNqT0p4VlI3UHBVUHRI?= =?utf-8?B?SUdRZDUraE15VlQ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FMclhsck01?= =?utf-8?B?TFQybGlhUlN0M0hnUDZ0bngvbXlHRnJlZlUxbnF4d0VWem9VdGhES041Rlgx?= =?utf-8?B?dkowYkkxU3YrTVV5azN6QVhwalZoQjVmbXZFNjd6SjFGU0tCTXgycVZyUmlH?= =?utf-8?B?NWNRS3h4aEpWbGg1b21BZmpiaC8zRWlFejVWTHMyYTNFZ2RJb2IvRURLcEV2?= =?utf-8?B?dWNYWVcxR2VJb3VjMEwybUxxS2N2R1A3am1IOUxhU1gxcUF4TDZhV3VSa0d5?= =?utf-8?B?SjZqVWx2czduQVRuMkkvWTgyWGpObTVka1RPMXh0Uk5McnEzaVg4VmF1R1dw?= =?utf-8?B?NEJleVRzUmc2ME42bnZ2VVlIR2RpdTNWc3huUTg4UDd4eVZMckRsQjNnOE1X?= =?utf-8?B?djcvZzlSSmNMdnRQeFhsdDV0d0JETVhCaGszanZGaVRXZnhRNXgySUJ2SEJW?= =?utf-8?B?WjM0Zk1LNUtaamFKUDIyK3NkTjZvTVdIWUV2M3duQ2tLN1lyVytZZ2NuMjd0?= =?utf-8?Q?Zki2WFxCtO+fT2pW2Hbxx1a7T?= 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: 5fe0d1df-d5f6-4eab-20b1-08dcbdb3d485 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2024 05:25:24.1911 (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: BanFrRVF4zsvORqLpmdkmEk4IBo6tAVFVZpNyNV7arW/dx1cgmKgJAXtnCoSsrMH+44ouSj/RPcikcvipKtGu2Es5sD1O01K/ezBCvi9Bu4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR18MB5269 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: aR30f2FlnOKm2LSpf2u8CUAKDLZHZFm0 X-Proofpoint-ORIG-GUID: aR30f2FlnOKm2LSpf2u8CUAKDLZHZFm0 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-15_18,2024-08-15_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 > -----Original Message----- > From: Stephen Hemminger > Sent: Sunday, August 11, 2024 9:47 PM > To: Rakesh Kudurumalla > Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; > orika@nvidia.com; thomas@monjalon.net; dev@dpdk.org; Jerin Jacob > ; Nithin Kumar Dabilpuram > ; stable@dpdk.org > Subject: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock > availability >=20 > On Sun, 11 Aug 2024 21:=E2=80=8A29:=E2=80=8A57 +0530 Rakesh Kudurumalla > wrote: > Race condition betw= een jobstats > and time metrics > for forwarding and flushing is maintained using spinlo= ck. > > Timer metrics are not displayed=20 > On Sun, 11 Aug 2024 21:29:57 +0530 > Rakesh Kudurumalla wrote: >=20 > > Race condition between jobstats and time metrics for forwarding and > > flushing is maintained using spinlock. > > Timer metrics are not displayed properly due to the frequent > > unavailability of the lock.This patch fixes the issue by introducing a > > delay before acquiring the lock in the loop. This delay allows for > > betteravailability of the lock, ensuring that show_lcore_stats() can > > periodically update the statistics even when forwarding jobs are > > running. > > > > Fixes: 204896f8d66c ("examples/l2fwd-jobstats: add new example") > > Cc: stable@dpdk.org > > > > Signed-off-by: Rakesh Kudurumalla >=20 > Would be better if this code used RCU and not a lock Currently the jobstats app uses the lock only for collecting single snapsho= t of different statistics and printing the same from main core. With RCU si= nce we cannot pause the worker core to collect such a single snapshot, inte= grating RCU would need a full redesign of the application and would take lo= t of effort.