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 D672FA0032; Mon, 18 Jul 2022 11:44:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 750154069F; Mon, 18 Jul 2022 11:44:04 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A027840041 for ; Mon, 18 Jul 2022 11:44:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658137443; x=1689673443; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=uobChcGBDNhRK3DsXZQdOunD61diSW8NTeY/07naJWk=; b=Q4bh4QDuDU2uKIEiHxi9E1Sxf+aPS2aahnuqNI849fR0/c2pXYQ3I6ni q6rXAbzWATEWvs2uKQo65xtRrdb+z59B3FsSuLyzrfP8MvogUn4jTPJQo uJhNPnQWb650pQ9U1/npAdlJ+NGnJ2C3VpmFhTw1DOnG/T+JOS3bIUE7m 9+ZdyErYSP02mHiSq8qWfI04p+Qnw5u5Pb0ZD1VHVnhy5/T8A0+LYP7+S XO0EZf2Rg0/OwG+XFSNXs+Bg6UzgzpyfoWLFkn+sc9vv6cWpiDKmMifjr 8M5OHcLNGc+kBgHkEl5EHCLTByFBUKH3JEsYiqTjv0hUYhv5++SNIeyle Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="347868118" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="347868118" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 02:44:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="547429832" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 18 Jul 2022 02:44:01 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 18 Jul 2022 02:44:00 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Mon, 18 Jul 2022 02:44:00 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.170) 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.2308.27; Mon, 18 Jul 2022 02:44:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cZtPgk53Br4fQrZAs4abhQIQTtf1fv1vW7GgvUiAO9PK2aojoGDNNctG+uCYSWU9BuV4pAlFs60fKX4MXz4YI8iJusZJsSpNQVIdnJTK7K8UqkSeYy6FsID2a0xQW4OuVsME8LTFXR/aBjRIAXUdiXU4eS2/OsjptTn43aqLS8K7R3nKtQz4HOqTzGjSj5BW3ae377bvJf7uUp/ZbEtt1BSRW+/67hubCZOftVcF+a79cN9ZpfHNEukoj8pT0vqwJKbnY8bHyaNOhf+jiRnCYBmGPpUxUw2m1vYcHYR8f1prN8L86KbqOjSL3aIJ3Jtb66jXQW4gtC/jlrnogog5ew== 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=FEOw/wJBVebP7UGJPTjhWxziHkN0XsUJuxKAjFR6eOc=; b=nVdy3NnB8oQWy4K8P5Y6yhg1E1SIZU01EvNkApvyZe/Zrqek8+USv5he85CvI5EfTejdwbvISeno4y5KKYvmu0jjHuoN975LIgFh9ceGeBoeurXShHUfHMmf1ceR5eL0r5NMsDa2q3ndqiHLgZB7D5IQwoDuef7ef9Uhd1k3/BFV1NiVB7cnv5HC8NZ2hr8bZaIOKfFPgPFJU63my2z8o5Rsg8apNnWc84VEVTwVKxjGYLCzTrMUgxGqGjYMeH94eyW2QxmMiJ6IBq9F4wax0Xl2dK12hFJrJOIWMf5jcr7dJzJwBW7ykIRb+DxyfA8dKsI8vE/TTWAhCda9YUqpTw== 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 BN6PR11MB1251.namprd11.prod.outlook.com (2603:10b6:404:48::10) by PH7PR11MB6401.namprd11.prod.outlook.com (2603:10b6:510:1fb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Mon, 18 Jul 2022 09:43:59 +0000 Received: from BN6PR11MB1251.namprd11.prod.outlook.com ([fe80::128:8fb:9d0:1a9f]) by BN6PR11MB1251.namprd11.prod.outlook.com ([fe80::128:8fb:9d0:1a9f%8]) with mapi id 15.20.5438.023; Mon, 18 Jul 2022 09:43:59 +0000 Message-ID: <9a27efbd-31d1-7525-51b0-ead0d969e98a@intel.com> Date: Mon, 18 Jul 2022 10:43:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH v1 1/2] eal: add lcore busyness telemetry Content-Language: en-US To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , "Honnappa Nagarahalli" , , Bruce Richardson , Nicolas Chautru , Fan Zhang , Ashish Gupta , Akhil Goyal , David Hunt , "Chengwen Feng" , Kevin Laatz , "Ray Kinsella" , , Ferruh Yigit , Andrew Rybchenko , , Sachin Saxena , , Ori Kam , Konstantin Ananyev CC: Conor Walsh , nd References: <24c49429394294cfbf0d9c506b205029bac77c8b.1657890378.git.anatoly.burakov@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D871CC@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35D871CD@smartserver.smartshare.dk> From: "Burakov, Anatoly" In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D871CD@smartserver.smartshare.dk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0217.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::6) To BN6PR11MB1251.namprd11.prod.outlook.com (2603:10b6:404:48::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 531b202a-818f-44b6-d1cb-08da68a209d8 X-MS-TrafficTypeDiagnostic: PH7PR11MB6401:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bblUQvva1RuPSeb4gIU2gX+tnWmIZhxzD8YrytbK8+hIZV/KJxSt8uRLdh0ukcfziisGYtCn6L0GxcOJ3OJYkOqWKE/cDz4snCwVtgydyFUrTBPM1RW5r1vhfzKKmGsYtQlKx9kLonKuuWmOpjz4SslDyVqc/mI5FWQfY6WSNutBzwLRL8GnGtzalT/2+HwBoRyAeHG7v7TP84pKBY4yTgZj4YChmLR93niiIQ63AbBQgpuJYgC8h4r5kjlpJZBY6X8zTZFUvD0t/THK61ayMx+VSRaQxgRrwKwkFdVBNEFBqw0GHIvtG8oZ23CTb2jWp4guT4Qrh9nHizWpuIKAH0VTR7WCAPpC6qL2b497GAJvU9ucAd0GWp8MxCG99oXMfK09xH6BxXSgdSJDFkXbrxkv4OvXY8zFlRUZnEj24XfFXuYeUDw9Z0FhG8slr4RYarRT2vRoABHneQbdxAqbOn9fTVXj/+YYJeU2Vs6MtN1CpdDQnquopLDe3dtMzoQ0LLiS8lgrxiySo5QVYpXJP13sN+6QON5tAH50yHdiA7lg5L/+/aihhNc2biSoASDMP+5HlxpBT50D6W531ALSJQnW2EUNortMzIe2NGNOECqAvz9iki60WNfWpqTTy+wXNXu48OoazUqw3FDOdG9O52pVQDBhOHFwSy24MX0CimVDD2MJUKWhXZWluhWT3i3pNKF/G4KNQOWS4av72UZXta4Wt1xluUssuc8+uJc5HDgafI+yYGcPaDhtkzgY3oYIG6pTuSZW211xd8MEWB3pnPkHGN109zd2whd3iU0D23fUGbgxdDnRIY1huBPkPOykm+Bz16riSOCBx5XwyPZe7icmHbfRcoCXp2s4r/CZ0SE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB1251.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(396003)(39860400002)(346002)(136003)(366004)(376002)(5660300002)(316002)(7416002)(31696002)(86362001)(54906003)(110136005)(38100700002)(2906002)(921005)(82960400001)(4326008)(36756003)(83380400001)(8676002)(186003)(31686004)(2616005)(66946007)(66574015)(66556008)(66476007)(6512007)(478600001)(8936002)(26005)(6486002)(41300700001)(6506007)(53546011)(6666004)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eHdQYTdSOW5JR21DbEhveFk4OGlsUTgxcVpnUGhuUE1tZHdqam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WFhLdU9HWHNTRmZ6clREYnN2YU52YlZRTkFKeWo1S3RkdVRhb1V2dnN2Umk2?= =?utf-8?B?dDYrbWtFSjZWdmFjRVU2dithZjRnNlZGUFpxaFY2QjA4elBCTVo1ZklrM01Z?= =?utf-8?B?Vyt6UUNLelVpUlZDUlFuUk1hdVdYWmVpRkZVSXdESmVvaGxqaHByN05PN2k5?= =?utf-8?B?WXNBbWNnSHVhZGdpdVovRHNzbkQwZ00xR1Ntc25KY3N0dFI1NWVzRUtBeXBJ?= =?utf-8?B?T2hqeE8zajg2QlBSeFdyLytrMWFPN1Vmdjc1VmZtL0RZbnBaTWRJMDRTZGpB?= =?utf-8?B?NzNsL2c2ME1LM3Q5UjFJb2hSS1ZqZ0VYR1ROdnJLa05tMXNWQWdQTUQxanJr?= =?utf-8?B?SFE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 531b202a-818f-44b6-d1cb-08da68a209d8 X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB1251.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2022 09:43:58.9135 (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: ltpQpzzufskSC9qeR1kd8oQznO/5pg1o3zM2BmTIr2qDMXGxPvJeB85Z/d8dDCh3GWNeVrlgFLRcQWPs9X3ZPxTnwS2JO/y7DwOvm4HleOY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6401 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 17-Jul-22 10:56 AM, Morten Brørup wrote: >> From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com] >> Sent: Sunday, 17 July 2022 05.10 >> >> >> >>> Subject: RE: [PATCH v1 1/2] eal: add lcore busyness telemetry >>> >>>> From: Anatoly Burakov [mailto:anatoly.burakov@intel.com] >>>> Sent: Friday, 15 July 2022 15.13 >>>> >>>> Currently, there is no way to measure lcore 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 busyness. >>>> >>>> The busyness is calculated by relying on the fact that most DPDK >> API's >>>> will poll for packets. >>> >>> This is an "alternative fact"! Only run-to-completion applications >> polls for RX. >>> Pipelined applications do not poll for packets in every pipeline >> stage. >> I guess you meant, poll for packets from NIC. They still need to >> receive packets from queues. We could do a similar thing for rte_ring >> APIs. Ring API is already instrumented to report telemetry in the same way, so any rte_ring-based pipeline will be able to track it. Obviously, non-DPDK API's will have to be instrumented too, we really can't do anything about that from inside DPDK. > > But it would mix apples, pears and bananas. > > Let's say you have a pipeline with three ingress preprocessing threads, two advanced packet processing threads in the next pipeline stage and one egress thread as the third pipeline stage. > > Now, the metrics reflects busyness for six threads, but three of them are apples, two of them are pears, and one is bananas. > > I just realized another example, where this patch might give misleading results on a run-to-completion application: > > One thread handles a specific type of packets received on an Ethdev ingress queue set up by the rte_flow APIs, and another thread handles ingress packets from another Ethdev ingress queue. E.g. the first queue may contain packets for well known flows, where packets can be processed quickly, and the other queue for other packets requiring more scrutiny. Both threads are run-to-completion and handle Ethdev ingress packets. > > *So: Only applications where the threads perform the exact same task can use this patch.* I do not see how that follows. I think you're falling for a "it's not 100% useful, therefore it's 0% useful" fallacy here. Some use cases would obviously make telemetry more informative than others, that's true, however I do not see how it's a mandatory requirement for lcore busyness to report the same thing. We can document the limitations and assumptions made, can we not? It is true that this patchset is mostly written from the standpoint of a run-to-completion application, but can we improve it? What would be your suggestions to make it better suit use cases you are familiar with? > > Also, rings may be used for other purposes than queueing packets between pipeline stages. E.g. our application uses rings for fast bulk allocation and freeing of other resources. > Well, this is the tradeoff for simplicity. Of course we could add all sorts of stuff like dynamic enable/disable of this and that and the other... but the end goal was something easy and automatic and that doesn't require any work to implement, not something that suits 100% of the cases 100% of the time. Having such flexibility as you described comes at a cost that this patch was not meant to pay! -- Thanks, Anatoly