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 95E3B42E9E; Mon, 17 Jul 2023 18:14:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 244B640A80; Mon, 17 Jul 2023 18:14:40 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 4420C4068E for ; Mon, 17 Jul 2023 18:14:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689610478; x=1721146478; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=18gGEWR6WuBA8/4T4VGkt+J4BeFi/1M3pP96yY5kclQ=; b=jQ0wgZgjTnvtafAKmT2U55xlGVQjOLbIlDZweBYGq5N2J9li0LcooI4J 8Af7KscJNxVTTjUjMhZE8/vrE5myO2jm5Glfq2vpvQSob5QNAtzbzddrZ r36jmVR1v8XxG2/J3Kb1nG1LEZECjNIiQ3V/HRCKXNahtuhD/1nrYa5/u wUft41WZ2/Q6rHaGPQAY3YQ+YgT8ekJv04QsssPDpCWqpBbD3iqG1Hqz5 x8innCRa7pypku2fEA2DKPUE+fnfPLuubvDQdsrfTZgMd2NZFtLKO5Q8/ iqFVj9P1Bh0z/22fqROFLFu4o6cKG/JQJhL0e/AfFi6PoV5zcF/RlfKHq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="345564080" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="345564080" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 09:14:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="793301269" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="793301269" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 17 Jul 2023 09:14:34 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 17 Jul 2023 09:14:34 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 17 Jul 2023 09:14:33 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Mon, 17 Jul 2023 09:14:33 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Mon, 17 Jul 2023 09:14:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kHyQ+LSn2ST9X4eKQcDBUEm3oesDce660YZWYa0reSXiftZeUluQlzmOClFFl89y/oTwLFwWl5sEQKpi81QxNGMHtOV0cwOvQU2DmIsHQ2rbgADu5fDFWQHW94SempTKjOnuUUQ4OQp736biJ+6uT4eqi9RRxZCzsqlB+4//Ainnzr3SZiaOrsnKeQ3V5IVsmlP/Yy6Jesb0muco7dp1dHELmpkm9sd8KKkKU5MxdhOuIlr87lgkjestv9Wuys/ixL/3gA4LT1srnQ38mC2f8qMhwq+YeOe+JBLYvLrRfi87nUrZo7W9FDAsbv+RpJADlOA45xllRhufoUGhWzwJnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PRHEnqCb5uu+0jh2PDZDF9KYFvgjOxEivW6nDXa/658=; b=bUsab90XbjSXZFJvw+Th9w9BaKLliP3V3HhFadXOvimw8OKcJWlxxr8FBX8aoLqS4hNqgjdt242rNICNTW99YUqQGpedohE4i+vz57axfwD8q/XiTiucC1u9ar20lyha1Bcsls6BH1kSY41WOqMKOI1QF0mN+Fo1hRg4Lv3M6a/uU4FPXTu2DhO5ngNHXEziwKyx4kk9dd8O34y8CbAmJp4UM/NI3CBecb4E0bwhRTrHd7ooWHoQvIfEJ0bup0oNxGe/DEO6qZMK08I1jnEFFq7Ptmy2wNWjY388H0XtKO5z4W/bufgJaXP6D5Ui+wHUhxPAKpkHmcRt3+qnr6s3GA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SN7PR11MB7419.namprd11.prod.outlook.com (2603:10b6:806:34d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Mon, 17 Jul 2023 16:14:30 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::44fc:41c5:90da:642]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::44fc:41c5:90da:642%4]) with mapi id 15.20.6588.031; Mon, 17 Jul 2023 16:14:30 +0000 Date: Mon, 17 Jul 2023 17:14:20 +0100 From: Bruce Richardson To: Thomas Monjalon CC: David Marchand , , "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 Message-ID: References: <20230703112359.5067-1-thomas@monjalon.net> <12236357.O9o76ZdvQC@thomas> <3021259.BjyWNHgNrj@thomas> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3021259.BjyWNHgNrj@thomas> X-ClientProxiedBy: DUZPR01CA0252.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::22) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SN7PR11MB7419:EE_ X-MS-Office365-Filtering-Correlation-Id: 973e2cf2-8a68-43f9-e547-08db86e0e677 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kqBuUK3FS0KwkR820uCLVFBH2H0uNFikMoi+/GpoAm2ciTHKhi6/YCY97/3J/ZBlUDtj5RbwQ1Ih/Sgw1gLAWvGvayoCJ89BXigwusdoECNCvPxMMweSVA37638pXiVCzh0WvKabh9AiyqthWTNjTR4NDKrUHD7QzMUQqmfYHGUOpz03RQuZcbGcyK0q0yRZ4sA7UiRYXTl9bLXvGysUudF5cPKW68WjiTk4IXdfsu+J1+LdDOSb/pm/U6sPUb/eEyFP0nxJY1xu7cV4bIZbZ24/2ZFbi1gkZrd4PUp/ta/Q9iQh9U/s05nZRjQEAoIPRD0CKQ/+tCZXmHiwys3r1z6KXNR0dXZSSy5lPhrD0S4ezTvfjPKPiRLpivYTJqS7SH4LXsUdllJainWvPq4FcE8ioo7dfGV9SJ6Pq38+I01MYpvvLVVYaICC/PFKCsPem3uBl2o5atiAPWh0yz+zOeXNQSKul+T3liT4Cd/bbMKLux8vBzzt0eN1cwQi+A8xhWp3XeBnpMt0OgJdnsye/2j4OOo/jllSR7MHF0vRop7KIknB3zhmQ0XIeVQgGsKF X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(39860400002)(366004)(376002)(396003)(346002)(451199021)(86362001)(2906002)(44832011)(7416002)(66899021)(6512007)(186003)(83380400001)(6506007)(53546011)(26005)(107886003)(38100700002)(82960400001)(6486002)(6666004)(54906003)(316002)(5660300002)(66476007)(6916009)(66946007)(66556008)(4326008)(478600001)(41300700001)(8936002)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SWh3ZktKNkZpVkt6SDV5TVJrU0RKbjNtblhMaG9nVEVEempJRUUyMGlPUHAz?= =?utf-8?B?QndQcHBiNG9NSTJ3ODNTcHFGNXVUZW5qbDlmbjZWbXhvZWg5Z3ZFdVpoNzNq?= =?utf-8?B?dXZ5WlIwRTZCcGExdnk1WGpDVWlIRDN0dXdEY2MzMTdrTTJ2ek1GMmkwVU51?= =?utf-8?B?blBvVHEvbnVLZEFTZ2F5anhGNGFReERHWWxEN013RGo4d0JRZmV3NmNuOHJ6?= =?utf-8?B?cFJrK3gxWDVLd0UwVURZU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utf-8?B?OWFpTlJLSHhuVmh1elM3aGN6THg1Mk1wbWI3RW9ZMG9hNkNBK2JuYWwrZngr?= =?utf-8?B?Qm5Fd0U4eUdzaUw0dDJzUlltWEtNamFaUTVNMnBDU0VRYnZ4UENxS1BLdmJO?= =?utf-8?B?aFE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 973e2cf2-8a68-43f9-e547-08db86e0e677 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 16:14:30.3749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lZXviqNIpIFf1+hLr0ORtIFdFSvRbWHGyYzyVxa8VFP6/96DV5aDeicI60mkH7T32yMOCkxfXr5LUQzjlsZj0ONmUyoRdcZOUMV5IqBHVpg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7419 X-OriginatorOrg: intel.com 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 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 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 > > > > > --- > > > > > 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.