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 096D742490; Thu, 26 Jan 2023 10:40:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADDB640A79; Thu, 26 Jan 2023 10:40:14 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C91C440697 for ; Thu, 26 Jan 2023 10:40:13 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30Q9ERvZ002063; Thu, 26 Jan 2023 01:40:10 -0800 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nbpc903u0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Jan 2023 01:40:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xl95GeoRXybSkOlMQ2bgmh8//1uaIMTJUrSeGuO+ZblDtqagq4rbsvvZEfsKRi3zzXWMSrFgApLSczJn+5w9lKjtCvC+Kiq1ewHnwfWDS+u67691qgsD0BnvilXM9qvpDilB6tKnB+iNsC52bXMVdK98q5+cxzPcemLikLZVN/dt6PeJ8oA/BcgsQHsF4ajZiiQJnqpnEqivxwxEJdgdC4CDgzpKtMkOLTgJ9ymIYF1vjulmaah5mcX+SwXqfQtZXjVsE4nvJmd0QvbL+tP0NloVXqfG4mQ7d7/XWaXZtRVIHKwD6K1+j4FvoN83GkhRO/2sVxaW/Q/imcc5zJ7GDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zrKa4ahDznBtcWXU/qszhRzGCk5x7ZqbnbYvoyK2Cao=; b=jKqHhfDG+O8Ec4R8w993Zi5n6OdJ1QJRQ+iYsTDIx27ejwtG+rGPjQcScXorhONNF1lVcKwjGnG/5JpSzAu4qlxrYmOnaEAUnTy5aEcM6xHNFzXV6y595dZZBJv7OHNuffbexK+q1koWhGySxVpm2pWDJQiMQdzgsJsruKkBW/IyVDmqXd0Ln3PU+OCIPzpVurGfPDqEOInhbpzrzsnOrcYNa2xLmPDkCE4lkSJxCD3sTp3htX/llrHPXR5cmUSEbwr9SlEEbF5pInD5N+YuBur5tiAXvHqh/fkWwlsewZqSjrtIsBzieC5vR6ZAq+FgPJ4jhdr+ZiUghSOEJWfd7w== 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.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zrKa4ahDznBtcWXU/qszhRzGCk5x7ZqbnbYvoyK2Cao=; b=IT1Skd0V0ceksef6pnZ+S1JrFlNVtB1rn0KR1YyIKjJ27dsjVLX2jcthMyAcP20ePSYPxczOYWeDDkeMuz54oDpfcLemqHca1LO41pojc5XFjXUHB84Zwab977cdgeZPaKSs84YCBucb4z2JHz+C3daoBC46HsjxlwgQhaJRRqE= Received: from DM4PR18MB4368.namprd18.prod.outlook.com (2603:10b6:5:39d::6) by MN6PR18MB5415.namprd18.prod.outlook.com (2603:10b6:208:473::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.25; Thu, 26 Jan 2023 09:40:08 +0000 Received: from DM4PR18MB4368.namprd18.prod.outlook.com ([fe80::3117:f51c:37c2:fa05]) by DM4PR18MB4368.namprd18.prod.outlook.com ([fe80::3117:f51c:37c2:fa05%9]) with mapi id 15.20.6043.021; Thu, 26 Jan 2023 09:40:07 +0000 From: Tomasz Duszynski To: =?iso-8859-1?Q?Morten_Br=F8rup?= , "dev@dpdk.org" , Thomas Monjalon CC: Jerin Jacob Kollanukkaran , "Ruifeng.Wang@arm.com" , "mattias.ronnblom@ericsson.com" , "zhoumin@loongson.cn" , "bruce.richardson@intel.com" , "roretzla@linux.microsoft.com" Subject: RE: [PATCH v6 1/4] lib: add generic support for reading PMU events Thread-Topic: [PATCH v6 1/4] lib: add generic support for reading PMU events Thread-Index: AQHZLF9HxL6yMLPInESeqtNvHMF+j66nD34AgAlimuA= Date: Thu, 26 Jan 2023 09:40:07 +0000 Message-ID: References: <20230110234642.1188550-1-tduszynski@marvell.com> <20230119233916.4029128-1-tduszynski@marvell.com> <20230119233916.4029128-2-tduszynski@marvell.com> <98CBD80474FA8B44BF855DF32C47DC35D8769A@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8769A@smartserver.smartshare.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR18MB4368:EE_|MN6PR18MB5415:EE_ x-ms-office365-filtering-correlation-id: 992cd7f0-0382-4a65-49a0-08daff814f9b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T20V65ak0LlyskA4mareuf3plI4cAvJIED4DLwD4719Mts2nIsaswWjvM+2ea6iLxb4hf+ZGPiaqXwKoG6KblbIzc7BRlYgYEyE1tr3idd+Zix2mtr1EA68TVroTIiv39ZP0biX4Udlv8ev3GNdmbm5VJWFMltkrz2qeqIH/hox2j0Ev67HbTgdB6jVY6cI+vEatFWdGfOxoTUqPBWNEG0mU1LU0BIWh02TJDriKpj5A8T0l9gMrtpgqP4xA5uUsdFwg37vTJmol412AanX0mYeXqAtCJpbe3Y7I0DSBh6nxZealMJ98MwhJmgbbEgyRiUb5kLJMtr28fv/S7Qm6ysfCwWXkJZw8u+6yaaOBQExTp7NnEljdtcTT+hsWOusIo87vrwOl2bkGmhqBqomoKS2fN0jsoQzBckiSNlumLUBiG6D1AD7/G7znn0RhABRX8iUNl1NFWQYSDpi3UoevlUkF57w7iWxqS3wOsOOASFMKTsD5EGC+wzv16fyhf0uMlqoOPRTmAT9Jd6DqigMn3tE9HyN07nuZylWWKONmn7qgAAyTvgaqWW2h9kYQ87DDMTG8JL/FCH9+mbtFJCTKPbEc6JO7pIBWCQWn2fPBgWEr4eFL+e5onfguliipTu8t4V4f00nJiyiPCI/Jo6wVdBspr0vUpyuiF/ImauP8bvpkLAVzkKejqnHXI3yiroNZPBU3t5Pd0TjOEzrTgDVRaRsNzQI0C5W8l0K3kDOreWo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR18MB4368.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(396003)(39840400004)(376002)(136003)(346002)(366004)(451199018)(6506007)(7696005)(478600001)(86362001)(55016003)(110136005)(38070700005)(33656002)(83380400001)(41300700001)(26005)(66574015)(54906003)(2906002)(71200400001)(8676002)(8936002)(122000001)(52536014)(316002)(64756008)(5660300002)(38100700002)(66946007)(76116006)(9686003)(66446008)(4326008)(66556008)(186003)(66476007)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?eChahSLWciMLxFAWtSwnhdu8aSL+xm8AJPzX12bJaHToXpmM0G/fJMAMTl?= =?iso-8859-1?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/McjRWLS7jdcPLj?= =?iso-8859-1?Q?JcZfTbvra3uPVDx+hyQChqW/sjpha6Ojo/x/rh5b5sPEdnS84qK+B1GGu3?= =?iso-8859-1?Q?v27QZtHMUwA+6c8xi3Pf53roiRPzpRTshAHeJ4o4+x3zZWzZJn9j2dHG+S?= =?iso-8859-1?Q?dIB2uaqGH8T0B6b3WJVwu8YrlfpkrpEXvepjE74hebIevA4xEQeeWXLxDS?= =?iso-8859-1?Q?gx9wWvbRM2iP3Jlll0iV0oqHoawa0g7Qz4Y3DxnuNVrQnuaOFD4yZCUe6C?= =?iso-8859-1?Q?nyByS06GoMEJ503/EnzlqIon7RTbA2uCBSJsixeUEkFfsbbz/TO4h7fUxo?= =?iso-8859-1?Q?Fi1N7OXx3n3CBMFPLLewAUzjnLYKmtf19mKEHabZAUFSUrcEDPqQFOeWor?= =?iso-8859-1?Q?1yC9okhL7ajrHprZrYoC2VySrYhFc3VeK5FgZX0PHepdLUm6VGVcnTfBgb?= =?iso-8859-1?Q?OuwygliD9p8e7jt0voHJJnDaOiI+k8IBT+cQYyTBEFAW3P8xMZ1u7cxIhZ?= =?iso-8859-1?Q?5VQmr7dqFgYt0/dZbFpWVcw+x31uw380kkGRkSOJivx+60v2uL0IFOhdrY?= =?iso-8859-1?Q?ix4abQ3dko+L+VOK/QsBJ67Ok9y7P8RXu2LckiFAD+jkc3Mz/WiqD0V/Kd?= =?iso-8859-1?Q?TEuQu4bIzEGFq9gJ85VMGwUsJ9bMVv5Abk46ZxVlDSfQuWKnXoHvqnsbeK?= =?iso-8859-1?Q?dZFSGj9UNkCz1gE2JrYHFteHqoAxIL0w1N?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR18MB4368.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 992cd7f0-0382-4a65-49a0-08daff814f9b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2023 09:40:07.7161 (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: WHGc9/Gh6DGCUH5SwmzP/5J28oepvJ6ATPK6ZT6hFbXC4ZiTMtGtmUScpU3dGsLoIwpe0rUapOmmvuBg+lsCaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR18MB5415 X-Proofpoint-GUID: MtBeUJNFGmRIhjKrFwJJVddYUcvl0nnj X-Proofpoint-ORIG-GUID: MtBeUJNFGmRIhjKrFwJJVddYUcvl0nnj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-26_03,2023-01-25_01,2022-06-22_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: Morten Br=F8rup >Sent: Friday, January 20, 2023 10:47 AM >To: Tomasz Duszynski ; dev@dpdk.org; Thomas Monjal= on >Cc: Jerin Jacob Kollanukkaran ; Ruifeng.Wang@arm.com; >mattias.ronnblom@ericsson.com; zhoumin@loongson.cn; bruce.richardson@intel= .com; >roretzla@linux.microsoft.com >Subject: [EXT] RE: [PATCH v6 1/4] lib: add generic support for reading PMU= events > >External Email > >---------------------------------------------------------------------- >> From: Tomasz Duszynski [mailto:tduszynski@marvell.com] >> Sent: Friday, 20 January 2023 00.39 >> >> Add support for programming PMU counters and reading their values in >> runtime bypassing kernel completely. >> >> This is especially useful in cases where CPU cores are isolated >> (nohz_full) i.e run dedicated tasks. In such cases one cannot use >> standard perf utility without sacrificing latency and performance. >> >> Signed-off-by: Tomasz Duszynski >> --- > >If you insist on passing lcore_id around as a function parameter, the func= tion description must >mention that the lcore_id parameter must be set to rte_lcore_id() for the = functions where this is a >requirement, including all functions that use those functions. > Not sure why are you insisting so much on removing that rte_lcore_id(). Yes= that macro evaluates to integer but if you don't think about internals this resembles a function= call. Then natural pattern is to call it once and reuse results if possible. Pass= ing lcore_id around implies that calls are per l-core, why would that confuse anyone reading th= at code? Besides, all functions taking it are internal stuff hence you cannot call i= t elsewhere.=20 >Alternatively, follow my previous suggestion: Omit the lcore_id function p= arameter, and use >rte_lcore_id() instead. >