DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] Update lcore-worker name due to high number of cores
@ 2022-09-22 10:18 Abdullah Ömer Yamaç
  2022-09-22 10:30 ` [PATCH v2] lib/eal/linux: update " Abdullah Ömer Yamaç
  0 siblings, 1 reply; 9+ messages in thread
From: Abdullah Ömer Yamaç @ 2022-09-22 10:18 UTC (permalink / raw)
  To: dev; +Cc: Abdullah Ömer Yamaç

In this patch we suggest a new name for lcore-worker.
In case of more 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.

Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
---
 lib/eal/linux/eal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 46bf52cef0..9a168b7773 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -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)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] lib/eal/linux: update lcore-worker name due to high number of cores
  2022-09-22 10:18 [PATCH] Update lcore-worker name due to high number of cores Abdullah Ömer Yamaç
@ 2022-09-22 10:30 ` Abdullah Ömer Yamaç
  2022-09-22 15:18   ` Stephen Hemminger
  0 siblings, 1 reply; 9+ messages in thread
From: Abdullah Ömer Yamaç @ 2022-09-22 10:30 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Abdullah Ömer Yamaç, David Marchand

In this patch we suggest a new name for lcore-worker.
In case of more 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.

Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>

---
Cc: David Marchand <david.marchand@redhat.com>
---
 lib/eal/linux/eal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 46bf52cef0..9a168b7773 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -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)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] lib/eal/linux: update lcore-worker name due to high number of cores
  2022-09-22 10:30 ` [PATCH v2] lib/eal/linux: update " Abdullah Ömer Yamaç
@ 2022-09-22 15:18   ` Stephen Hemminger
  2022-09-23  7:06     ` [PATCH v3] eal: " Abdullah Ömer Yamaç
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2022-09-22 15:18 UTC (permalink / raw)
  To: Abdullah Ömer Yamaç; +Cc: dev, ferruh.yigit, David Marchand

On Thu, 22 Sep 2022 13:30:23 +0300
Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr> wrote:

> In this patch we suggest a new name for lcore-worker.
> In case of more 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.
> 
> Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
> 
> ---
> Cc: David Marchand <david.marchand@redhat.com>
> ---
>  lib/eal/linux/eal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
> index 46bf52cef0..9a168b7773 100644
> --- a/lib/eal/linux/eal.c
> +++ b/lib/eal/linux/eal.c
> @@ -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)

BSD should be setting name as well.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] eal: update lcore-worker name due to high number of cores
  2022-09-22 15:18   ` Stephen Hemminger
@ 2022-09-23  7:06     ` Abdullah Ömer Yamaç
  2022-09-26  9:39       ` David Marchand
  0 siblings, 1 reply; 9+ messages in thread
From: Abdullah Ömer Yamaç @ 2022-09-23  7:06 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, Abdullah Ömer Yamaç,
	Stephen Hemminger, David Marchand

In this patch we suggest a new name for lcore-worker.
In case of more 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.

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(-)

diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index ee5c929da8..a1bb5363b1 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -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,
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 46bf52cef0..9a168b7773 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -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)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] eal: update lcore-worker name due to high number of cores
  2022-09-23  7:06     ` [PATCH v3] eal: " Abdullah Ömer Yamaç
@ 2022-09-26  9:39       ` David Marchand
  2022-09-26  9:56         ` [PATCH v4] eal: fix thread names for high order lcores Abdullah Ömer Yamaç
                           ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Marchand @ 2022-09-26  9:39 UTC (permalink / raw)
  To: Abdullah Ömer Yamaç,
	Kevin Traynor, Luca Boccassi, Xueming(Steven) Li,
	Christian Ehrhardt
  Cc: dev, ferruh.yigit, Stephen Hemminger

Hello,

On Fri, Sep 23, 2022 at 9:06 AM Abdullah Ömer Yamaç
<omer.yamac@ceng.metu.edu.tr> wrote:
>
> In this patch we suggest a new name for lcore-worker.
> In case of more 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.
>
> Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

- Thanks, good catch.

Some comments though.
What matters is the lcore index, not the core/lcore count.
The commitlog could probably describe this better.

For example, this issue can be triggered with --lcores=0,10@1,100@2
and here we only have three lcores.
$ cat /proc/$(pidof dpdk-testpmd)/task/*/comm
dpdk-testpmd
eal-intr-thread
rte_mp_handle
lcore-worker-10
lcore-worker-10
telemetry-v2
telemetry-v1


And what do you think of following title:
"eal: fix thread names for high order lcores"

Can you update the release notes?


- Question to stable maintainers:
Do you think we should backport this fix?
As you can see below, this change affects EAL thread names, maybe some
users are monitoring them based on the names...


>
> ---
> 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(-)
>
> diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
> index ee5c929da8..a1bb5363b1 100644
> --- a/lib/eal/freebsd/eal.c
> +++ b/lib/eal/freebsd/eal.c
> @@ -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,
> diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
> index 46bf52cef0..9a168b7773 100644
> --- a/lib/eal/linux/eal.c
> +++ b/lib/eal/linux/eal.c
> @@ -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)
> --
> 2.27.0
>

Merci !

-- 
David Marchand


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4] eal: fix thread names for high order lcores
  2022-09-26  9:39       ` David Marchand
@ 2022-09-26  9:56         ` Abdullah Ömer Yamaç
  2022-09-26 10:03         ` [PATCH v5] " Abdullah Ömer Yamaç
  2022-09-26 10:44         ` [PATCH v3] eal: update lcore-worker name due to high number of cores Kevin Traynor
  2 siblings, 0 replies; 9+ messages in thread
From: Abdullah Ömer Yamaç @ 2022-09-26  9:56 UTC (permalink / raw)
  To: dev; +Cc: Abdullah Ömer Yamaç, Stephen Hemminger, David Marchand

In this patch we suggest a new name for lcore-worker.
In case of more 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.

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(-)

diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index ee5c929da8..a1bb5363b1 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -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,
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 46bf52cef0..9a168b7773 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -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)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5] eal: fix thread names for high order lcores
  2022-09-26  9:39       ` David Marchand
  2022-09-26  9:56         ` [PATCH v4] eal: fix thread names for high order lcores Abdullah Ömer Yamaç
@ 2022-09-26 10:03         ` Abdullah Ömer Yamaç
  2022-09-30  8:52           ` David Marchand
  2022-09-26 10:44         ` [PATCH v3] eal: update lcore-worker name due to high number of cores Kevin Traynor
  2 siblings, 1 reply; 9+ messages in thread
From: Abdullah Ömer Yamaç @ 2022-09-26 10:03 UTC (permalink / raw)
  To: dev; +Cc: Abdullah Ömer Yamaç, Stephen Hemminger, David Marchand

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(-)

diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index ee5c929da8..a1bb5363b1 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -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,
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 46bf52cef0..9a168b7773 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -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)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] eal: update lcore-worker name due to high number of cores
  2022-09-26  9:39       ` David Marchand
  2022-09-26  9:56         ` [PATCH v4] eal: fix thread names for high order lcores Abdullah Ömer Yamaç
  2022-09-26 10:03         ` [PATCH v5] " Abdullah Ömer Yamaç
@ 2022-09-26 10:44         ` Kevin Traynor
  2 siblings, 0 replies; 9+ messages in thread
From: Kevin Traynor @ 2022-09-26 10:44 UTC (permalink / raw)
  To: David Marchand, Abdullah Ömer Yamaç,
	Luca Boccassi, Xueming(Steven) Li, Christian Ehrhardt
  Cc: dev, ferruh.yigit, Stephen Hemminger

On 26/09/2022 10:39, David Marchand wrote:
> Hello,
> 
> On Fri, Sep 23, 2022 at 9:06 AM Abdullah Ömer Yamaç
> <omer.yamac@ceng.metu.edu.tr> wrote:
>>
>> In this patch we suggest a new name for lcore-worker.
>> In case of more 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.
>>
>> Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
>> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> - Thanks, good catch.
> 
> Some comments though.
> What matters is the lcore index, not the core/lcore count.
> The commitlog could probably describe this better.
> 
> For example, this issue can be triggered with --lcores=0,10@1,100@2
> and here we only have three lcores.
> $ cat /proc/$(pidof dpdk-testpmd)/task/*/comm
> dpdk-testpmd
> eal-intr-thread
> rte_mp_handle
> lcore-worker-10
> lcore-worker-10
> telemetry-v2
> telemetry-v1
> 
> 
> And what do you think of following title:
> "eal: fix thread names for high order lcores"
> 
> Can you update the release notes?
> 
> 
> - Question to stable maintainers:
> Do you think we should backport this fix?
> As you can see below, this change affects EAL thread names, maybe some
> users are monitoring them based on the names...
> 

No strong opinion, but backporting will change the name for any user who 
looks at this and only fix an issue for users using lcore names 100+. So 
would be inclined not to backport unless someone complains it is causing 
a real issue for their use case.

> 
>>
>> ---
>> 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(-)
>>
>> diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
>> index ee5c929da8..a1bb5363b1 100644
>> --- a/lib/eal/freebsd/eal.c
>> +++ b/lib/eal/freebsd/eal.c
>> @@ -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,
>> diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
>> index 46bf52cef0..9a168b7773 100644
>> --- a/lib/eal/linux/eal.c
>> +++ b/lib/eal/linux/eal.c
>> @@ -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)
>> --
>> 2.27.0
>>
> 
> Merci !
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] eal: fix thread names for high order lcores
  2022-09-26 10:03         ` [PATCH v5] " Abdullah Ömer Yamaç
@ 2022-09-30  8:52           ` David Marchand
  0 siblings, 0 replies; 9+ messages in thread
From: David Marchand @ 2022-09-30  8:52 UTC (permalink / raw)
  To: Abdullah Ömer Yamaç; +Cc: dev, Stephen Hemminger

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.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-30  8:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 10:18 [PATCH] Update lcore-worker name due to high number of cores Abdullah Ömer Yamaç
2022-09-22 10:30 ` [PATCH v2] lib/eal/linux: update " Abdullah Ömer Yamaç
2022-09-22 15:18   ` Stephen Hemminger
2022-09-23  7:06     ` [PATCH v3] eal: " Abdullah Ömer Yamaç
2022-09-26  9:39       ` David Marchand
2022-09-26  9:56         ` [PATCH v4] eal: fix thread names for high order lcores Abdullah Ömer Yamaç
2022-09-26 10:03         ` [PATCH v5] " Abdullah Ömer Yamaç
2022-09-30  8:52           ` David Marchand
2022-09-26 10:44         ` [PATCH v3] eal: update lcore-worker name due to high number of cores Kevin Traynor

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).