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 A941442E9E; Mon, 17 Jul 2023 18:08:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C6EA40A80; Mon, 17 Jul 2023 18:08:06 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 1A3B54068E for ; Mon, 17 Jul 2023 18:08:05 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 944245C0167; Mon, 17 Jul 2023 12:08:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 17 Jul 2023 12:08:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1689610084; x=1689696484; bh=FHlWjsHpUHeUOVtTY0Xwg9IsAIcjoacQodP g3sD3eGM=; b=qpw2iGg5jD4QAywors7BpXkbijxYUZSaekti5x8mmI3dd/UF6dH OxBexabzi1G5htZU+11nMV4/PnzhOQCMQICOQqXLR6p9BeVQR0kmBL9fjkACJnrI QaT8H63iLaqRRHe1PeMP9nIpJXQDXULCwOl2+denRlWF3FI78Map934bEXADX7dH VeI7ZIgV02rhz9vJldt0y4SG+jZ6mUq3E2Iad/abkpcsqsEXCYvMWfW0YfKZT4Ww 07cv8tNC033U6DnQs3h67kQKO/D55C7KLPceEfI4QfV8q8ic0dmhQBcnm57JBpyl DOOEGJ0hqVSdKVyYksmTKAZx6wBqPx4U+0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1689610084; x=1689696484; bh=FHlWjsHpUHeUOVtTY0Xwg9IsAIcjoacQodP g3sD3eGM=; b=UR2thN/P2VhFJpPJIl3ZYfG5Pl9FuAPYepZN3d2Gpp1pkJxJYCz Kd9GkkRJ99Klru+CeaOuHJ4uxUAF65h4MjnvH0NQUeXBGRLzibHH7+oz1ZuFv+8W jRxBiJMjcOp8t5Tpz4NlqAU5cDNMNQo8xiyzq3OI6OuMBn33sNo7VucHU+P1sxLk eZRvKXF2AJoUbSV3tQKhrMEtDn65hxNek9LSYTrJpKGbEdMFV67C/HJjjPkv7txg m8rDkBIQzA2o9QLAaDpQgrGIZajNfc6lEqgzFeWQMvEcNDpCrapAJwRui6dr0gMB J0/SXoYwbtxqFernUPtdSKIMzHiaukoa6uQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrgedvgdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepgedttdeljeejgeffkeekkedtjeevtdehvedtkeeivdeuuedviedu vdelveejueejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jul 2023 12:08:00 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: David Marchand , dev@dpdk.org, Timothy McDaniel , Shepard Siegel , Ed Czeck , John Miller , Rosen Xu , Matan Azrad , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Andrew Rybchenko , Tianfei Zhang , Xiao Wang , Maxime Coquelin , Chenbo Xia , Anatoly Burakov , Harman Kalra , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Naga Harish K S V , Jerin Jacob , Ciara Power Subject: Re: [PATCH] set namespace prefix to threads Date: Mon, 17 Jul 2023 18:07:59 +0200 Message-ID: <3021259.BjyWNHgNrj@thomas> In-Reply-To: References: <20230703112359.5067-1-thomas@monjalon.net> <12236357.O9o76ZdvQC@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 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=E2=80=AFPM Thomas Monjalon 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. > > >=20 > > > Yes, and no way to discover this limit. > > >=20 > > >=20 > > > > > > > > Signed-off-by: Thomas Monjalon > > > > --- > > > > Please review carefully, I may have missed things. > > > > > > > > Note: we should use rte_ctrl_thread_create() as much as possible. > > > > > > >=20 > > > 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() call= s too. > >=20 > > You're right, I'll do a second pass. > >=20 > > > > 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, thre= ad_name); > > > > > > > > ret =3D rte_thread_set_affinity_by_id(lcore_config[= i].thread_id, > > >=20 > > > 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. > >=20 > > In general no need of hyphen before a number. > > I will change to dpdk-worker%d. > >=20 > 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 :) "rte" is used for API. "dpdk-" is used for file prefixes. When running an application, users may understand what is a "dpdk-xyz" thre= ad, 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.