On Mon, Jul 17, 2023 at 06:07:59PM +0200, Thomas Monjalon wrote: > 17/07/2023 16:09, Bruce Richardson: > > On Mon, Jul 03, 2023 at 01:49:55PM +0200, Thomas Monjalon wrote: > > > 03/07/2023 13:38, David Marchand: > > > > On Mon, Jul 3, 2023 at 1:24 PM Thomas Monjalon <tho...@monjalon.net> > > > > wrote: > > > > > > > > > > When looking at threads in a system, it can be confusing > > > > > to find some unknown threads without a clue it is started by DPDK. > > > > > > > > > > Let's start all thread names with "dpdk-" > > > > > and the driver name if it comes from a driver. > > > > > > > > > > One more constraint: the thread names are generally limited > > > > > to 16 characters, including NUL character. > > > > > > > > Yes, and no way to discover this limit. > > > > > > > > > > > > > > > > > > Signed-off-by: Thomas Monjalon <tho...@monjalon.net> > > > > > --- > > > > > Please review carefully, I may have missed things. > > > > > > > > > > Note: we should use rte_ctrl_thread_create() as much as possible. > > > > > > > > > > > > > As for this comment, we should advertise rte_thread_create_control() > > > > instead, as it is thread library agnostic. > > > > Which leads me to suggest looking at rte_thread_create_control() calls > > > > too. > > > > > > You're right, I'll do a second pass. > > > > > > > > diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c > > > > > index 7008303e11..e201acd1c2 100644 > > > > > --- a/lib/eal/freebsd/eal.c > > > > > +++ b/lib/eal/freebsd/eal.c > > > > > @@ -843,7 +843,7 @@ rte_eal_init(int argc, char **argv) > > > > > > > > > > /* Set thread_name for aid in debugging. */ > > > > > snprintf(thread_name, sizeof(thread_name), > > > > > - "rte-worker-%d", i); > > > > > + "dpdk-worker-%d", i); > > > > > rte_thread_set_name(lcore_config[i].thread_id, > > > > > thread_name); > > > > > > > > > > ret = > > > > > rte_thread_set_affinity_by_id(lcore_config[i].thread_id, > > > > > > > > We changed this not so long ago with 8ae946970ed3 ("eal: fix thread > > > > name for high order lcores") which offered up to 4 digits for lcores. > > > > With your proposal, we are back to only 3 digits, which is probably > > > > enough, but I preferred to raise it. > > > > > > In general no need of hyphen before a number. > > > I will change to dpdk-worker%d. > > > > > While I know that "dpdk-" is probably the clearer prefix, "rte-" is also > > well-know as the standard API prefix for DPDK. Give we have a 16-char > > limit, I would suggest keeping using the "rte" prefix on the basis of > > brevity! > > It's one character less :)
Yes, but when you are limited to 16 characters, each char counts! "dpdk-" uses 31% of the available chars, vs 25% for the shorter prefix. > "rte" is used for API. > "dpdk-" is used for file prefixes. > When running an application, users may understand what is a "dpdk-xyz" thread, > while "rte-xyz" is more cryptic if they are not involved with DPDK at all. > > > A third alternative is to just use "dp-" as prefix... > > A third alternative looks like more confusion. > The idea of the thread prefix is to indicate, > to anyone monitoring a system, where the threads come from. > Sure. No massive objections either way, just keen to see the names being as meaningful as possible.