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 C17B0A034C; Tue, 30 Aug 2022 12:26:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B48EB40F18; Tue, 30 Aug 2022 12:26:33 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 84BD140F17 for ; Tue, 30 Aug 2022 12:26:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661855191; x=1693391191; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=LgLPE3IrMIfGuC4P6t1kwrcfpWGBxqrHZ8GnxUHcAjY=; b=mfsiMTGoQdn1Q1JfkHzC6bNWXi5nstHwHCeQnqvJpUNZzQLMkK3r7/MD AaxRlgiyzY07ssJ8o6tdY470iYICfFa18n9s5Wr6S8RI3xrImShW1o/mU q3zINRqpqHfrAgSwQs4h3qgWeQprU6XvK9qSXS2Y0EzxNVu+iuTH2WQGT lxDFor+uYmVFgdwpoRhX8o5BMqDEikzdGCgNvoaXFbcAyCKnCyNOGolgO Yhg9Y6z8P14QQ5Aa08R0zdTG2t4VsUYgngZ2chz7sT5w+TR1ai5zJOU66 ZvmvG7SFe00wwsLVHEzcoBntQn/xMxiU35ZHt1nERD0QLngoIKMabj7JO A==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="293883586" X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="293883586" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 03:26:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="679982492" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga004.fm.intel.com with ESMTP; 30 Aug 2022 03:26:30 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 30 Aug 2022 03:26:30 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 30 Aug 2022 03:26:30 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 30 Aug 2022 03:26:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lHd34TorC5DZhlhHhxUVI3rdLOvkal2DHQoTmHoN6b3w+cQpKAZGh65tjKlinjtcCm8NQBHlxIeNmxhepyfBCa0S429SHvmTM0X7FBjEl1UYluVT742Jpd/VdWrUYOoK6cPmuYtoR1vbfGQeVz87bimPW9DRljgZFhDAhv9OTZ5sdAzeCsqIbAziffXA1WtlLorg7panZ+8DjRWLhZ4aJIpgDFLX39WZiCEMf1iXA6RtX50oGuabSnhrDnCRc1NsXMRV8uY2Vn4XDaOYej//ObrUgXpqNh1OcRRlE6YVsmna8Hs5kEnBJ8ctJCWLV0lmaSX3RzHpP6dzT3sN63solA== 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=amLQUA5nymTA/eEkAmSQffXYGdDcy83I9k7ok8Af0ZM=; b=mTHZ1hsHZOBOiULaZe4R6pwCumZbxzQQi4wrVKo8WHwCN2qwwOs2B/d0nl4a/xHr7iBIE2FLckojLiIq9VWQRXlcO1BjyULS38XguH1+Oj0LZfL397hV1R2kqKvINnyqmSiWs+1CIZWkQ1qu0u8qM8TqxHoqa/CAiplBMnFWwyB2rCS/RewZ9gqX3UWzX4K9sdQbkfJqqjw3QketcWnMGlflUABb4jiJlCF/DwRHmr36fgzbuEycmLQlJFw78TP81DaHFpRoMKDU9d1qdmu3gJPkesI+wFetn6OEZ77vSIMJhzYvQ1dbGLJSPCQNna1SzmntSheE9XvIlSHvInIN2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by PH7PR11MB6331.namprd11.prod.outlook.com (2603:10b6:510:1fd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.21; Tue, 30 Aug 2022 10:26:28 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749%4]) with mapi id 15.20.5566.016; Tue, 30 Aug 2022 10:26:28 +0000 Message-ID: <47f31919-b1df-869d-19d9-afdd880724fb@intel.com> Date: Tue, 30 Aug 2022 11:26:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v3 1/3] eal: add lcore poll busyness telemetry Content-Language: en-US To: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= , CC: , Conor Walsh , "David Hunt" , Bruce Richardson , Nicolas Chautru , Fan Zhang , Ashish Gupta , "Akhil Goyal" , Chengwen Feng , "Ray Kinsella" , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Jerin Jacob , Sachin Saxena , Hemant Agrawal , Ori Kam , "Honnappa Nagarahalli" , Konstantin Ananyev References: <24c49429394294cfbf0d9c506b205029bac77c8b.1657890378.git.anatoly.burakov@intel.com> <20220825152852.1231849-1-kevin.laatz@intel.com> <20220825152852.1231849-2-kevin.laatz@intel.com> From: Kevin Laatz In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2P250CA0006.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::11) To MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ead429a-22f5-4fd4-35c4-08da8a721900 X-MS-TrafficTypeDiagnostic: PH7PR11MB6331:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vc99QlNy6VQbfY+ZOlQLqWY9fZ+etxcMEgH19tmffTdow9f80XTS7xIRe8DBYBNbbW8K5eKpFzs51IUtx30g8LtPZeQeqI7nfc0HGln0+6InvOtmon0Qv8oDMahWLNAZH0BJELcUkYhQPZXKSl6kFpAGDZFBe5qkFs7+UDNSESodtPAL1f3cUpHUMgnwbK6XYt2siVgMSqVa+Uaz+jw/rbesbmHM/dVmrNwYAdiGNfE8YkDTn0+2PZG3VPkXM9GQ2JZ6qqtZhM8ARh0BGl/lJqZbuYRgTTeiN9TORajnJZ96E5yKnDewYV95DTVdo2FXbeJ8TXYncQV0G+9+SWUxogi+o6nKID6TUjwz8FEGaQTHbC7hpZ46FETOaTWF2X9iHc5VRGBvWofv2nI0ZOfkK/fxp7Z+4iYQtqOAxhxBfw5sx/wgynNlJcdy9IB+X16NI2aK8hHJTOmmdbNlno2q5JYg85XrgSfKel+MojEb3GBfFEOu6kRkwMLqrDmsuK+YN2C6lEsf7SjbwztqueXQsvZ1rhVWftMU7vvA+YxluNjH3l4i7975Q4AYq4YBwD2/ap36141RloV0N89j/kJ4oOkYOE2VEm1ShkUWwe/GIiC6CyMyNTgnGcw1ueu7uW+Ovl+z2oJYZNa8XLbeKVSeLFq9kYh2/fhB1Ur2pKV/x9z1/hUFm/VFY/A3Z9U535tEDFzbJn7jbFs9/T0+/kb7lYtVWo7uM/QpFAoIYEtiYoqhzA7DKND2++mJ1W0cvvo/bAvrPHuXPZoGTdWMprCzCMCkb+Er0PRbRVrX97CNaKE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5872.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(366004)(346002)(39860400002)(396003)(376002)(66476007)(6512007)(2906002)(44832011)(6506007)(66946007)(7416002)(4326008)(8676002)(86362001)(26005)(41300700001)(5660300002)(53546011)(6666004)(36756003)(66574015)(66556008)(2616005)(6486002)(31686004)(8936002)(83380400001)(186003)(31696002)(478600001)(54906003)(316002)(296002)(82960400001)(38100700002)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZHlYMEpvTHllaUhtQkNKWUxkMTZITjJ3cjdGNkxXUmFRdWx5MkI5UTlFYmtm?= =?utf-8?B?YlRIRzJFL1A1dFRHTEJOWlJCN2tqYllTWXk5eHlDbmx4TmsrcGhuNFVlZFR2?= =?utf-8?B?SGtFbkszN1NYNWRKSk5ZaFlycFN1RVQvdllnN1Vidkpvc25SOVJiTGE5TEpr?=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Uh2K2ZuY01iK1U4ZnZFZUY0d0lkd3N5cVNXV2pXQ1Bl?= =?utf-8?B?SWhiMy9FSWd5VWJRWWFuMTkxTHE4TnVnS2dmbElocnMwTUsvUU9yZzM1ZDRw?= =?utf-8?B?cmwxU2lvV2dHT1BxczVGbFBsRXFHT1htdm1OR3Eydy9ieUU4QWxCcmVoM0tR?= =?utf-8?B?cHhDdGlTU0JzYS9vMFYrcWMrM3NBTjlrZWlEVVhvQm5uQnVabTkzQndsMXVv?= =?utf-8?B?Y3c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6ead429a-22f5-4fd4-35c4-08da8a721900 X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2022 10:26:27.9351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0zles5tSwHje32zZTffi7B5UUGVWjud3/YF+tGTY3h6D1pMPtgdHanUGfepRtHI3EG/BG6MMrBuzhw54k6AVdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6331 X-OriginatorOrg: intel.com 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 On 26/08/2022 23:06, Mattias Rönnblom wrote: > On 2022-08-25 17:28, Kevin Laatz wrote: >> From: Anatoly Burakov >> >> To avoid performance impact from having lcore telemetry support, a >> global >> variable is exported by EAL, and a call to timestamping function is >> wrapped >> into a macro, so that whenever telemetry is disabled, it only takes one > > Use an static inline function if you don't need the additional > expressive power of a macro. > > I suggest you also mention the performance implications, when this > function is enabled. Keeping the performance implications of having the feature enabled in mind, I think the expressive power of the macro is beneficial here. >> diff --git a/lib/eal/common/eal_common_lcore_telemetry.c >> b/lib/eal/common/eal_common_lcore_telemetry.c >> new file mode 100644 >> index 0000000000..bba0afc26d >> --- /dev/null >> +++ b/lib/eal/common/eal_common_lcore_telemetry.c >> @@ -0,0 +1,293 @@ >> +/* SPDX-License-Identifier: BSD-3-Clause >> + * Copyright(c) 2010-2014 Intel Corporation >> + */ >> + >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> + >> +#ifdef RTE_LCORE_POLL_BUSYNESS >> +#include >> +#endif >> + >> +int __rte_lcore_telemetry_enabled; > > Is "telemetry" really the term to use here? Isn't this just another > piece of statistics? It can be used for telemetry, or in some other > fashion. > > (Use bool not int.) Will change to bool. Looking at this again, the telemetry naming is more accurate here since '__rte_lcore_telemetry_enabled' is used to enable/disable the telemetry endpoints. -Kevin