From: Kevin Laatz <kevin.laatz@intel.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com
Subject: [PATCH v4 2/3] eal: add cpuset lcore telemetry entries
Date: Thu, 1 Sep 2022 15:39:34 +0100 [thread overview]
Message-ID: <20220901143936.3549493-3-kevin.laatz@intel.com> (raw)
In-Reply-To: <20220901143936.3549493-1-kevin.laatz@intel.com>
From: Anatoly Burakov <anatoly.burakov@intel.com>
Expose per-lcore cpuset information to telemetry.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/common/eal_common_lcore_telemetry.c | 47 +++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/lib/eal/common/eal_common_lcore_telemetry.c b/lib/eal/common/eal_common_lcore_telemetry.c
index 540ac5eba0..976a615d4e 100644
--- a/lib/eal/common/eal_common_lcore_telemetry.c
+++ b/lib/eal/common/eal_common_lcore_telemetry.c
@@ -19,6 +19,8 @@ rte_atomic32_t __rte_lcore_telemetry_enabled;
#ifdef RTE_LCORE_POLL_BUSYNESS
+#include "eal_private.h"
+
struct lcore_telemetry {
int poll_busyness;
/**< Calculated poll busyness (gets set/returned by the API) */
@@ -247,6 +249,48 @@ lcore_handle_poll_busyness(const char *cmd __rte_unused,
return 0;
}
+static int
+lcore_handle_cpuset(const char *cmd __rte_unused,
+ const char *params __rte_unused,
+ struct rte_tel_data *d)
+{
+ char corenum[64];
+ int i;
+
+ rte_tel_data_start_dict(d);
+
+ RTE_LCORE_FOREACH(i) {
+ const struct lcore_config *cfg = &lcore_config[i];
+ const rte_cpuset_t *cpuset = &cfg->cpuset;
+ struct rte_tel_data *ld;
+ unsigned int cpu;
+
+ if (!rte_lcore_is_enabled(i))
+ continue;
+
+ /* create an array of integers */
+ ld = rte_tel_data_alloc();
+ if (ld == NULL)
+ return -ENOMEM;
+ rte_tel_data_start_array(ld, RTE_TEL_INT_VAL);
+
+ /* add cpu ID's from cpuset to the array */
+ for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
+ if (!CPU_ISSET(cpu, cpuset))
+ continue;
+ rte_tel_data_add_array_int(ld, cpu);
+ }
+
+ /* add array to the per-lcore container */
+ snprintf(corenum, sizeof(corenum), "%d", i);
+
+ /* tell telemetry library to free this array automatically */
+ rte_tel_data_add_dict_container(d, corenum, ld, 0);
+ }
+
+ return 0;
+}
+
void
rte_lcore_telemetry_free(void)
{
@@ -274,6 +318,9 @@ RTE_INIT(lcore_init_telemetry)
rte_telemetry_register_cmd("/eal/lcore/poll_busyness_disable", lcore_poll_busyness_disable,
"disable lcore poll busyness measurement");
+
+ rte_telemetry_register_cmd("/eal/lcore/cpuset", lcore_handle_cpuset,
+ "list physical core affinity for each lcore");
}
#else
--
2.31.1
next prev parent reply other threads:[~2022-09-01 14:37 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 13:12 [PATCH v1 1/2] eal: add lcore busyness telemetry Anatoly Burakov
2022-07-15 13:12 ` [PATCH v1 2/2] eal: add cpuset lcore telemetry entries Anatoly Burakov
2022-07-15 13:35 ` [PATCH v1 1/2] eal: add lcore busyness telemetry Burakov, Anatoly
2022-07-15 13:46 ` Jerin Jacob
2022-07-15 14:11 ` Bruce Richardson
2022-07-15 14:18 ` Burakov, Anatoly
2022-07-15 22:13 ` Morten Brørup
2022-07-16 14:38 ` Thomas Monjalon
2022-07-17 3:10 ` Honnappa Nagarahalli
2022-07-17 9:56 ` Morten Brørup
2022-07-18 9:43 ` Burakov, Anatoly
2022-07-18 10:59 ` Morten Brørup
2022-07-19 12:20 ` Thomas Monjalon
2022-07-18 15:46 ` Stephen Hemminger
2022-08-24 16:24 ` [PATCH v2 0/3] Add lcore poll " Kevin Laatz
2022-08-24 16:24 ` [PATCH v2 1/3] eal: add " Kevin Laatz
2022-08-24 16:24 ` [PATCH v2 2/3] eal: add cpuset lcore telemetry entries Kevin Laatz
2022-08-24 16:24 ` [PATCH v2 3/3] doc: add howto guide for lcore poll busyness Kevin Laatz
2022-08-25 7:47 ` [PATCH v2 0/3] Add lcore poll busyness telemetry Morten Brørup
2022-08-25 10:53 ` Kevin Laatz
2022-08-25 15:28 ` [PATCH v3 " Kevin Laatz
2022-08-25 15:28 ` [PATCH v3 1/3] eal: add " Kevin Laatz
2022-08-26 7:05 ` Jerin Jacob
2022-08-26 8:07 ` Bruce Richardson
2022-08-26 8:16 ` Jerin Jacob
2022-08-26 8:29 ` Morten Brørup
2022-08-26 15:27 ` Kevin Laatz
2022-08-26 15:46 ` Morten Brørup
2022-08-29 10:41 ` Bruce Richardson
2022-08-29 10:53 ` Thomas Monjalon
2022-08-29 12:36 ` Kevin Laatz
2022-08-29 12:49 ` Morten Brørup
2022-08-29 13:37 ` Kevin Laatz
2022-08-29 13:44 ` Morten Brørup
2022-08-29 14:21 ` Kevin Laatz
2022-08-29 11:22 ` Morten Brørup
2022-08-26 22:06 ` Mattias Rönnblom
2022-08-29 8:23 ` Bruce Richardson
2022-08-29 13:16 ` Kevin Laatz
2022-08-30 10:26 ` Kevin Laatz
2022-08-25 15:28 ` [PATCH v3 2/3] eal: add cpuset lcore telemetry entries Kevin Laatz
2022-08-25 15:28 ` [PATCH v3 3/3] doc: add howto guide for lcore poll busyness Kevin Laatz
2022-09-01 14:39 ` [PATCH v4 0/3] Add lcore poll busyness telemetry Kevin Laatz
2022-09-01 14:39 ` [PATCH v4 1/3] eal: add " Kevin Laatz
2022-09-01 14:39 ` Kevin Laatz [this message]
2022-09-01 14:39 ` [PATCH v4 3/3] doc: add howto guide for lcore poll busyness Kevin Laatz
2022-09-02 15:58 ` [PATCH v5 0/3] Add lcore poll busyness telemetry Kevin Laatz
2022-09-02 15:58 ` [PATCH v5 1/3] eal: add " Kevin Laatz
2022-09-03 13:33 ` Jerin Jacob
2022-09-06 9:37 ` Kevin Laatz
2022-09-02 15:58 ` [PATCH v5 2/3] eal: add cpuset lcore telemetry entries Kevin Laatz
2022-09-02 15:58 ` [PATCH v5 3/3] doc: add howto guide for lcore poll busyness Kevin Laatz
2022-09-13 13:19 ` [PATCH v6 0/4] Add lcore poll busyness telemetry Kevin Laatz
2022-09-13 13:19 ` [PATCH v6 1/4] eal: add " Kevin Laatz
2022-09-13 13:48 ` Morten Brørup
2022-09-13 13:19 ` [PATCH v6 2/4] eal: add cpuset lcore telemetry entries Kevin Laatz
2022-09-13 13:19 ` [PATCH v6 3/4] app/test: add unit tests for lcore poll busyness Kevin Laatz
2022-09-13 13:19 ` [PATCH v6 4/4] doc: add howto guide " Kevin Laatz
2022-09-14 9:29 ` [PATCH v7 0/4] Add lcore poll busyness telemetry Kevin Laatz
2022-09-14 9:29 ` [PATCH v7 1/4] eal: add " Kevin Laatz
2022-09-14 14:30 ` Stephen Hemminger
2022-09-16 12:35 ` Kevin Laatz
2022-09-19 10:19 ` Konstantin Ananyev
2022-09-22 17:14 ` Kevin Laatz
2022-09-26 9:37 ` Konstantin Ananyev
2022-09-29 12:41 ` Kevin Laatz
2022-09-30 12:32 ` Jerin Jacob
2022-10-01 14:17 ` Konstantin Ananyev
2022-10-03 20:02 ` Mattias Rönnblom
2022-10-04 9:15 ` Morten Brørup
2022-10-04 11:57 ` Bruce Richardson
2022-10-04 14:26 ` Mattias Rönnblom
2022-10-04 23:30 ` Konstantin Ananyev
2022-09-30 22:13 ` Mattias Rönnblom
2022-09-14 9:29 ` [PATCH v7 2/4] eal: add cpuset lcore telemetry entries Kevin Laatz
2022-09-14 9:29 ` [PATCH v7 3/4] app/test: add unit tests for lcore poll busyness Kevin Laatz
2022-09-30 22:20 ` Mattias Rönnblom
2022-09-14 9:29 ` [PATCH v7 4/4] doc: add howto guide " Kevin Laatz
2022-09-14 14:33 ` [PATCH v7 0/4] Add lcore poll busyness telemetry Stephen Hemminger
2022-09-16 12:35 ` Kevin Laatz
2022-09-16 14:10 ` Kevin Laatz
2022-10-05 13:44 ` Kevin Laatz
2022-10-06 13:25 ` Morten Brørup
2022-10-06 15:26 ` Mattias Rönnblom
2022-10-10 15:22 ` Morten Brørup
2022-10-10 17:38 ` Mattias Rönnblom
2022-10-12 12:25 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901143936.3549493-3-kevin.laatz@intel.com \
--to=kevin.laatz@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).