[v5] eal: fix thread names for high order lcores
Checks
Commit Message
In this patch we suggest a new name for lcore-worker.
In case of higher order (greater than 99) logical cores, name is truncated
(length is restricted to 16 characters, including the
terminating null byte ('\0')) and it makes hard to follow threads.
Ex: This issue can be generated using following arguments:
--lcores=0,10@1,100@2
Then we have;
lcore-worker-10
lcore-worker-10
Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
Cc: David Marchand <david.marchand@redhat.com>
---
lib/eal/freebsd/eal.c | 2 +-
lib/eal/linux/eal.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Comments
On Mon, Sep 26, 2022 at 12:03 PM Abdullah Ömer Yamaç
<omer.yamac@ceng.metu.edu.tr> wrote:
>
> In this patch we suggest a new name for lcore-worker.
> In case of higher order (greater than 99) logical cores, name is truncated
> (length is restricted to 16 characters, including the
> terminating null byte ('\0')) and it makes hard to follow threads.
>
> Ex: This issue can be generated using following arguments:
> --lcores=0,10@1,100@2
> Then we have;
> lcore-worker-10
> lcore-worker-10
>
> Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, with a note in the RN.
Thanks.
@@ -817,7 +817,7 @@ rte_eal_init(int argc, char **argv)
/* Set thread_name for aid in debugging. */
snprintf(thread_name, sizeof(thread_name),
- "lcore-worker-%d", i);
+ "rte-worker-%d", i);
rte_thread_setname(lcore_config[i].thread_id, thread_name);
ret = pthread_setaffinity_np(lcore_config[i].thread_id,
@@ -1248,7 +1248,7 @@ rte_eal_init(int argc, char **argv)
/* Set thread_name for aid in debugging. */
snprintf(thread_name, sizeof(thread_name),
- "lcore-worker-%d", i);
+ "rte-worker-%d", i);
ret = rte_thread_setname(lcore_config[i].thread_id,
thread_name);
if (ret != 0)