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 EF2E9A0542; Tue, 6 Sep 2022 11:37:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAB9340143; Tue, 6 Sep 2022 11:37:48 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 67BE3400D6 for ; Tue, 6 Sep 2022 11:37:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662457066; x=1693993066; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=57Ty4Cb6jYntchHBZboKYjarEZK1OZ22jnpkwulnPGI=; b=Ju0+/ep7Gi7co7d+etXLu6vlJGvwmjci4TRW4N9Jy2qbspJgPasDuu09 6jXUlA2gPyOG6UV8kkTsxHH3pJIUc30rdcZJe5aZqsh0ucx96NK8vhJFr 36IvxKLm9fzo7W5nclHZnNryWflBi7AlVnMKuwQLGWazgIjoYK7I8CMAt xgGvNr4xkn01qS1SjmaXGlCJfrj2Ym+qU8Yn3XAnmUD0f/kpaFt5navem 04iKvbNHGcZ0TqgwPHr/Vdvn4y1J+VkwmPCW83vPu4zH0kgrR6sxg/YZN F+VCmZg5HTOIbdom/pBb4m6m0yvUDopBh6f3OKJpEP4/de2Q8uhA8V8th Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="297334360" X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="297334360" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 02:37:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="756309436" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 06 Sep 2022 02:37:21 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 6 Sep 2022 02:37:21 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 6 Sep 2022 02:37:21 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) 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, 6 Sep 2022 02:37:21 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 6 Sep 2022 02:37:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+AU6oGWMUuwyMvm6PnpGAUVg64BjX/fAgkmxqyGPe5IEY54yd6vQaNfNJ9aKL5tqwqifIw5zcrPUFgSD1bnuIfP6Za0fGZwTtfvvpH0dMFBoVy0OL93Kv71Kz4nvY4IP0A6Kx7czXVPjE5BK+hYCRm7NNewlrkqUKjnh9O6z1YGt2XOimy3H5c/Fz1Byr9hnGP59025z/0vZvOu0Z7s5INJ88KLRavJc629lw9ZI4nmBr2dgBqPIGh35SeMGLB3HsoCrO+V+Nxq6G/bUlYZ+bu7fph+AXktMd+x82IGZB+mSvGZEU2sDeC3IAc/oQoKxxuP5ngu+bZBB0CqR5ukhg== 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=mDEhxRUVIADO7W5OMoeO3j6oXZuil/xCLpuOv1PwoIk=; b=WNC/J6+ZnjjAI3c+YTUrOv3zCC88gtas/m2xbb6L6HMoPNqt0N+CT4+HyC2PWRlpk/IIdmSxfiJlFVfPxjDf6paHtnKn9528Dvp70MwGyohLm3aDJRmVOv/c76uecwIo7td9SXbH9D4EbAxdtJHc/+hsHRLm33Vq391ZA3A3V6B8cEOLI0gPdk7+UqOaj5l0dpz4+tphVKaZ3oxjVayknQDlufelXb5NUMeO6VIA42FmdUTz5BDcMgLmtHyeIpvPsOn+LOefVkwW6urElvge+qZxzFCJtdjs3o1I/Wo7gP4VoEhkrixJYSHQD27aQD5CRXwNiTmnOqXDTPjElnrLQw== 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 IA1PR11MB6147.namprd11.prod.outlook.com (2603:10b6:208:3ed::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Tue, 6 Sep 2022 09:37:19 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749%6]) with mapi id 15.20.5588.011; Tue, 6 Sep 2022 09:37:19 +0000 Message-ID: Date: Tue, 6 Sep 2022 10:37:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v5 1/3] eal: add lcore poll busyness telemetry To: Jerin Jacob CC: dpdk-dev , Anatoly Burakov , 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> <20220902155827.79076-1-kevin.laatz@intel.com> <20220902155827.79076-2-kevin.laatz@intel.com> Content-Language: en-US From: Kevin Laatz In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PAZP264CA0013.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:21::18) 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: 82cad176-1e24-40ec-f9fe-08da8feb6456 X-MS-TrafficTypeDiagnostic: IA1PR11MB6147:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +OGhxbcI6y7SeJ4t3K+4+vsVx5C8XTHw2Pm3uRTeCBbG1nYIc7XfIDE/EM/6riNcZhRHWIavx5mWnCK6hGCyp9c638QhWQX7qIzB6W336WWyIcoTmA801Hw8DK7n51gIyaH+6Usjs5IdRNRPgiEv64CzjuAlty9xvHmkSGOT2+6JY+v3VRwGkmUS/w4XRZgJFH7S4an2d3z988LUYCuPlzUQRWhXzo8jKgMofz8lByX6wHjuy6miBBruXjnNo1zuFQACf8nnCBaQtB9TYQGpwHh888xK1dFIIRz2NZhtkxJYtl0pB08KeE9SfXoSoo1JvpetAAx6I0z6pEBphkQdOI4sdUS2aVHauSigxeJmm9pDCuuQ+qf3IA1K/XjLroigR89XlYe5z5LytPuZ8/bKFTmtgpVVhFiwIbk3sl+XoFM83xszYJoF1xyXpn0nJi9QT+fRZ4N/qdbn4COH5iqua2bSlxuiPu8aNGSBVturjl0LvBJARQD9/JHmZSe7wcVnnnJxiGn7MV+Nc/Yb1k2eGmpt/tTRKP729kcHhpL2AcumZHEZ/UHGL3VMbGBx/gJOKKmboiV1GkVxtah491lpzADLgfkHVRMufBHiE++L1ta4Y2yn1KpWtLTT2qAnLH1iOBn0RLapFrEi5MRo8Ltd7pM4Yq4tI7KDpQt4B26EfcjuAalrnqu+2GGebHbohN4m956OdwM4DSjE8xjSwX/44e/xKA0uXTvZBJtcDSQ+tMU3FV+jDa9GY9xQOhSgnggqnXCdJ9kkBczdGufTEJ0ljfj6DK3dwPimBQrKcT5d1ic= 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)(346002)(376002)(366004)(136003)(39860400002)(396003)(5660300002)(6486002)(7416002)(6666004)(82960400001)(8936002)(41300700001)(66556008)(478600001)(4326008)(2616005)(83380400001)(31696002)(186003)(86362001)(26005)(66476007)(8676002)(53546011)(2906002)(6506007)(44832011)(6512007)(38100700002)(66946007)(36756003)(31686004)(6916009)(316002)(54906003)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VlBETEVpUWE0azhBdjVRamdrZ1c0RnN1UldkZ1FPYzhJWlVtamZ6THlxbFRk?= =?utf-8?B?a3p5UCsrWlFZZ3JwUk9tYlJlTEtvZ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?= =?utf-8?B?b1VaSWp1dWFualhTdmh5VUFDazJlSWRQZzNqcHk2YmszY01YOVlZYjlZN2I4?= =?utf-8?B?V1VmN0k0d1RKTXJoa3JHSlVSR2J2aWtMaVQxa0tSaE5QcUNic2w3eC9ObS9X?= =?utf-8?B?OTFTeWNZaU1ueTFTcUw3NWFWd0w1Y0I5V1VOeG5wM2Zva01tRngvbDF5SXRt?= =?utf-8?B?Q0hGMmNOQXdNT0tZaHdFc0pzZmVDWHl3QXR0RU1kdTdnU2hiSDMxN09BeDFI?= =?utf-8?Q?snZwoxeAWnztyE3mGbyUTABhA?= X-MS-Exchange-CrossTenant-Network-Message-Id: 82cad176-1e24-40ec-f9fe-08da8feb6456 X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2022 09:37:19.3149 (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: 6GVbDD7QA50YJVFm5YNK5EGwieFwjIkcqFPtOb19cfCPlkd8nJAB4+u0EwV7n8YeG0kW7fJ6+YcVAJn7plb1cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6147 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 03/09/2022 14:33, Jerin Jacob wrote: > On Fri, Sep 2, 2022 at 9:26 PM Kevin Laatz wrote: >> From: Anatoly Burakov >> >> Currently, there is no way to measure lcore poll busyness in a passive way, >> without any modifications to the application. This patch adds a new EAL API >> that will be able to passively track core polling busyness. >> >> The poll busyness is calculated by relying on the fact that most DPDK API's >> will poll for work (packets, completions, eventdev events, etc). Empty >> polls can be counted as "idle", while non-empty polls can be counted as >> busy. To measure lcore poll busyness, we simply call the telemetry >> timestamping function with the number of polls a particular code section >> has processed, and count the number of cycles we've spent processing empty >> bursts. The more empty bursts we encounter, the less cycles we spend in >> "busy" state, and the less core poll busyness will be reported. >> >> In order for all of the above to work without modifications to the >> application, the library code needs to be instrumented with calls to the >> lcore telemetry busyness timestamping function. The following parts of DPDK >> are instrumented with lcore poll busyness timestamping calls: >> >> - All major driver API's: >> - ethdev >> - cryptodev >> - compressdev >> - regexdev >> - bbdev >> - rawdev >> - eventdev >> - dmadev >> - Some additional libraries: >> - ring >> - distributor >> >> 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 >> additional branch and no function calls are performed. It is disabled at >> compile time by default. >> >> This patch also adds a telemetry endpoint to report lcore poll busyness, as >> well as telemetry endpoints to enable/disable lcore telemetry. A >> documentation entry has been added to the howto guides to explain the usage >> of the new telemetry endpoints and API. >> >> Signed-off-by: Kevin Laatz >> Signed-off-by: Conor Walsh >> Signed-off-by: David Hunt >> Signed-off-by: Anatoly Burakov > This version looks good to me. Thanks for this new feature. > > I think, we need to add a UT for this new rte_lcore_poll_* APIs also > add a performance test case to measure the cycles for > RTE_LCORE_POLL_BUSYNESS_TIMESTAMP [1] > > [1] > Reference performance test application for trace: app/test/test_trace_perf.c Thanks for reviewing, Jerin. I'll look into adding a UT, thanks!