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 1482F4240B; Wed, 18 Jan 2023 10:42:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AADA24067E; Wed, 18 Jan 2023 10:42:18 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8680A4003F for ; Wed, 18 Jan 2023 10:42:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674034937; x=1705570937; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=mStzFiMQh3Le2fnJ5f3FG9X0QVIweqp93vFO+a2Kab4=; b=G62NcD1m8V+oS8SslB9NSu37xrUBSaAHtsUDslmp2qrf/HfU7+JuI3oL 1zwOuoFe1H6a+zheFJiuCnG3Br8QhZbyRO4BsaYgjmBXQXi0fiB0SUlNh 1EkwcTHW5LdOMIJ4MS+MwYhuar2GlnM72lq6aYWJdeCYiOvpi01p9pUIU 22qZdtT4/lgzCAh/DLSPybB2l+CaQ7eyRlrtEUfkWK/kzjXwtlyd2Kcu5 23qJkmZ2MlOZdCySog+PROjPRp7f7Tmzrf0trk/zbGk7stxNpAwmAqH93 2wM2QbUpgJ/xzmByMNqgEsxrHoiD4oynlRExtw8ISbt557GF3KAYG0PD9 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="326213639" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="326213639" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 01:42:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="767678965" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="767678965" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP; 18 Jan 2023 01:42:16 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 18 Jan 2023 01:42:15 -0800 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.2507.16 via Frontend Transport; Wed, 18 Jan 2023 01:42:15 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) 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.2507.16; Wed, 18 Jan 2023 01:42:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GviggwZL9+Rt2ktCTbNiPNnBKmX9XObcIwDTa4B+cb9fbBOHQXFxkt4elU5ptlky6rASy10jmio9Yp9L7tAy3irOOGyoV21WOD4SdhzMfu0xgaN8rn3OZmoNrfkKrBhn9sRw8a3ZPSoeTua48az5pPF8G6/k9OoBU0QIPhx666/CYCMivZk/iEJdH23ft/tEidbZXp2J2HyaRFqzvJxMgzlOzItdv9xdxMRKFLMKJyvr6LlDeg0HozfqDUs7SvkyZSwEzGsESW3bqI5fX97ouBuaGjBGLz03Ow4eBb/9LkAW0daA8uwaWUD23J235zgAo9sSOVk/uq9nk8GLuLItnw== 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=Sp5npG1D1/Hm5JiriILTvaYHLK/5L3YShmIpPVBinNc=; b=ENEY/lb1hVjQK9EhGsCx/PBc2u4HSp/RMGMrKftXOh58duAHn0fpi78CZKONZmIHK1z9MlW9gloXOALh/EnZPtq0b84IW8NWx4w8xzpr0xeounxITU28IW4jydyIlhruZ0T9Mu7ccWzOReQTgCGRqtsC5+85fGPKod13ZYSTR+7hcGJ6vl3669QUAQMNS7GaScuUqJodikWstx4XEjnF8syN/mSc37dM7OT6C4EP4LHTbNm/Py9jz/gzjgSw0dVBDmJrRHbS6EZGqbIV9YdnW99QmedpYpBXEpXIHejPUWFbD9LLgi5XimibrCF06z8G98Y5i0zQyst+QpYMZiuDxA== 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 DS7PR11MB7690.namprd11.prod.outlook.com (2603:10b6:8:e6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Wed, 18 Jan 2023 09:42:13 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041%7]) with mapi id 15.20.6002.013; Wed, 18 Jan 2023 09:42:13 +0000 Message-ID: <50d3c808-c227-2915-3d07-74e8c3c7fab8@intel.com> Date: Wed, 18 Jan 2023 09:42:07 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v5 1/4] eal: add lcore info in telemetry To: Robin Jarry , CC: Tyler Retzlaff , =?UTF-8?Q?Morten_Br=c3=b8rup?= References: <20221123102612.1688865-1-rjarry@redhat.com> <20221216102109.64142-1-rjarry@redhat.com> <20221216102109.64142-2-rjarry@redhat.com> Content-Language: en-US From: Kevin Laatz In-Reply-To: <20221216102109.64142-2-rjarry@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P123CA0009.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::21) To MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR11MB5872:EE_|DS7PR11MB7690:EE_ X-MS-Office365-Filtering-Correlation-Id: 91c4fb72-7baa-4bb3-2f5d-08daf9384719 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aDSAbkATTmh9A6PMXFUAQ0z6B4dnr587FICQQDkuqZVTKnAzQE5xbRp7YAuCM21XmCugigQTfjVcP44zMgnmu3uC3r9xE2ObIRSi6ZD3wTs9FCxker2RSUMO753LC79wWvXpJMYQ10xSqkobF6SNKDLtGvyQcs4BMFbfxA9okJRTIA/AOUxdkcZ/mKcEZI4+8vi9kApd8MwxCPw2W8caqt4N6AFhfHexmr1ZjO7uVH9mo7yPVabcry598wLPlX3r1+SnZwHBbbrFjbJYgzFZTxAjiCXW7zOEXHljqWKarsp6TwGAH9boA5HEUkO2yoRxCEPmRHv/JIlIwXFbeRhmVHWQytsxtuIAbmShadvNbpGivQlIsbnB3XTWfIsjFNrN63tLMcArRXF6d2epRxfpI3PoalMPO7fg2SK4U2pv8C2a3Dp1suyYzhG1CNgsDjUBleZrdEgSdfVqYVrL07ekEAw2D5cwNeb2lt6dM0P9nK67wq8v0lXYaSCnAOaXwykLFaNbsOFD9XSLz6hqepa5Va2AyTX6Lz6USC4oFjYGJuoto4pB65FNYWLzohV8eFrKmHEa/ubtpgLnsGGSRRi5bJ6XRzvHJENoQjFVrHSr1F+qgUf1RMY5KEn6jl/gNiM1iFOXL6HlTW/xpDJY2RtH4ZM1sb6KfzCbzvPqcEOqGoZF+NCYoIZASFsHI1/cFkF7tKJv2KkP4LqbUoaQXOLrWeFfF7y9p6jYPJs5sclFp58= 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:(13230022)(396003)(366004)(376002)(39860400002)(346002)(136003)(451199015)(44832011)(31696002)(86362001)(36756003)(82960400001)(38100700002)(316002)(8676002)(54906003)(66946007)(66476007)(41300700001)(4326008)(66556008)(8936002)(5660300002)(6506007)(2616005)(6512007)(6666004)(186003)(26005)(31686004)(2906002)(53546011)(6486002)(478600001)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UUxzNG1KSHpjSVdYMnlsMzZBZmM5Q3BHcFk1K3M4V0M0UDM4QkJjRCtQd1R4?= =?utf-8?B?RERJZkI5L2FzS0szV3JneEp5bm1QQnhRN1hDOE9yOHl5bjBqcm05UUJUMFpX?= =?utf-8?B?aWxnUi9xTHVuVW1xMGUyTUpJZm5UeFpzUmFVOVR3N3VWNVNUaWxsZ1hjbmZR?= =?utf-8?B?TUdoUTNDemUvS1ZvRmhpRXpaQ1EwN01YSVNYbklJRFJBallpL3I0cG5oYncw?= =?utf-8?B?ZFBLVUkzbnJoRDUwenh2czVQZU1XVmUzUnBXYlpmWGZvR0xGSlg2NUtXYmdr?= =?utf-8?B?bkhFblNZdHZTMzBNTkpqMG1MM2ViWmp6ZlYzU1RKV2Y1MUhjQlNPd25vaVhB?= =?utf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VZCTk1YSTBpNU9kTUl5dzRFd1BO?= =?utf-8?B?dEE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 91c4fb72-7baa-4bb3-2f5d-08daf9384719 X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 09:42:13.5944 (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: AFCmMP7Dci3lVyKIDOJ/Qb7d8Z9BNqlxMdOSVai8jOq/H9u2KsHIoRRl3Q+EpuQj+Qak9ZrkOhHWBASt5lB9gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7690 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 16/12/2022 10:21, Robin Jarry wrote: > Report the same information than rte_lcore_dump() in the telemetry > API into /eal/lcore/list and /eal/lcore/info,ID. > > Example: > > --> /eal/lcore/info,3 > { > "/eal/lcore/info": { > "lcore_id": 3, > "socket": 0, > "role": "RTE", > "cpuset": [ > 3 > ] > } > } > > Signed-off-by: Robin Jarry > Acked-by: Morten Brørup > --- > v4 -> v5: No change > > lib/eal/common/eal_common_lcore.c | 96 +++++++++++++++++++++++++++++++ > 1 file changed, 96 insertions(+) > > diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c > index 06c594b0224f..16548977dce8 100644 > --- a/lib/eal/common/eal_common_lcore.c > +++ b/lib/eal/common/eal_common_lcore.c > @@ -10,6 +10,9 @@ > #include > #include > #include > +#ifndef RTE_EXEC_ENV_WINDOWS > +#include > +#endif > > #include "eal_private.h" > #include "eal_thread.h" > @@ -456,3 +459,96 @@ rte_lcore_dump(FILE *f) > { > rte_lcore_iterate(lcore_dump_cb, f); > } > + > +#ifndef RTE_EXEC_ENV_WINDOWS > +static int > +lcore_telemetry_id_cb(unsigned int lcore_id, void *arg) > +{ > + struct rte_tel_data *d = arg; > + return rte_tel_data_add_array_int(d, lcore_id); > +} > + > +static int > +handle_lcore_list(const char *cmd __rte_unused, > + const char *params __rte_unused, > + struct rte_tel_data *d) > +{ > + int ret = rte_tel_data_start_array(d, RTE_TEL_INT_VAL); > + if (ret) > + return ret; > + return rte_lcore_iterate(lcore_telemetry_id_cb, d); > +} > + > +struct lcore_telemetry_info { > + unsigned int lcore_id; > + struct rte_tel_data *d; > +}; > + > +static int > +lcore_telemetry_info_cb(unsigned int lcore_id, void *arg) > +{ > + struct lcore_telemetry_info *info = arg; > + struct rte_config *cfg = rte_eal_get_configuration(); > + struct rte_tel_data *cpuset; > + const char *role; > + unsigned int cpu; > + > + if (info->lcore_id != lcore_id) > + return 0; > + > + switch (cfg->lcore_role[lcore_id]) { > + case ROLE_RTE: > + role = "RTE"; > + break; > + case ROLE_SERVICE: > + role = "SERVICE"; > + break; > + case ROLE_NON_EAL: > + role = "NON_EAL"; > + break; > + default: > + role = "UNKNOWN"; > + break; > + } > + rte_tel_data_start_dict(info->d); > + rte_tel_data_add_dict_int(info->d, "lcore_id", lcore_id); > + rte_tel_data_add_dict_int(info->d, "socket", rte_lcore_to_socket_id(lcore_id)); > + rte_tel_data_add_dict_string(info->d, "role", role); > + cpuset = rte_tel_data_alloc(); > + if (!cpuset) > + return -ENOMEM; > + rte_tel_data_start_array(cpuset, RTE_TEL_INT_VAL); > + for (cpu = 0; cpu < CPU_SETSIZE; cpu++) > + if (CPU_ISSET(cpu, &lcore_config[lcore_id].cpuset)) > + rte_tel_data_add_array_int(cpuset, cpu); > + rte_tel_data_add_dict_container(info->d, "cpuset", cpuset, 0); > + > + return 0; > +} > + > +static int > +handle_lcore_info(const char *cmd __rte_unused, const char *params, struct rte_tel_data *d) > +{ > + struct lcore_telemetry_info info = { .d = d }; > + char *endptr = NULL; > + if (params == NULL || strlen(params) == 0) > + return -EINVAL; > + errno = 0; > + info.lcore_id = strtoul(params, &endptr, 10); > + if (errno) > + return -errno; > + if (endptr == params) > + return -EINVAL; > + return rte_lcore_iterate(lcore_telemetry_info_cb, &info); > +} > + > +RTE_INIT(lcore_telemetry) > +{ > + rte_telemetry_register_cmd( > + "/eal/lcore/list", handle_lcore_list, > + "List of lcore ids. Takes no parameters"); > + rte_telemetry_register_cmd( > + "/eal/lcore/info", handle_lcore_info, > + "Returns lcore info. Parameters: int lcore_id"); > +} > +#endif /* !RTE_EXEC_ENV_WINDOWS */ Hi Robin, Thanks for taking the time to work on this. It is a good implementation for debug use-cases. I have 2 suggestions which would improve the usability of the data: 1. Could we make the lcore_id paramater on /eal/lcore/info optional? This would allow users to read info for all lcores in the application at once. 2. Could we add 2 additional telemetry endpoints? One which returns an array of busy_cycles values and the other returns an array of total_cycles values. These arrays could be used in conjunction with the /eal/lcore/list endpoint to quickly read the usage related metrics. I've included an example diff below [1]. We have a use-case beyond debugging in which we read telemetry every few milliseconds. From a performance point of view, adding the 2 additional endpoints would be very beneficial. Thanks, Kevin [1] diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c index 210636d21d..94ddb276c5 100644 --- a/lib/eal/common/eal_common_lcore.c +++ b/lib/eal/common/eal_common_lcore.c @@ -569,6 +569,32 @@ handle_lcore_info(const char *cmd __rte_unused, const char *params, struct rte_t         return rte_lcore_iterate(lcore_telemetry_info_cb, &info);  } +static int +lcore_telemetry_busy_cycles_cb(unsigned int lcore_id, void *arg) +{ +       struct rte_tel_data *d = arg; +       struct rte_lcore_usage usage; +       rte_lcore_usage_cb usage_cb; +       unsigned long cycles = 0; + +       memset(&usage, 0, sizeof(usage)); +       usage_cb = lcore_usage_cb; +       if (usage_cb != NULL && usage_cb(lcore_id, &usage) == 0) +               cycles = usage.busy_cycles; + +       return rte_tel_data_add_array_u64(d, cycles); +} + +static int +handle_lcore_busy_cycles(const char *cmd __rte_unused, +               const char *params __rte_unused, struct rte_tel_data *d) +{ +       int ret = rte_tel_data_start_array(d, RTE_TEL_U64_VAL); +       if (ret) +               return ret; +       return rte_lcore_iterate(lcore_telemetry_busy_cycles_cb, d); +} +  RTE_INIT(lcore_telemetry)  {         rte_telemetry_register_cmd( @@ -577,5 +603,8 @@ RTE_INIT(lcore_telemetry)         rte_telemetry_register_cmd(                         "/eal/lcore/info", handle_lcore_info,                         "Returns lcore info. Parameters: int lcore_id"); +       rte_telemetry_register_cmd( +                       "/eal/lcore/busy_cycles", handle_lcore_busy_cycles, +                       "List of busy cycle values. Takes no parameters");  }  #endif /* !RTE_EXEC_ENV_WINDOWS */