Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3256350lqo; Tue, 21 May 2024 11:06:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXTvKJtcHI1YlfjerPuqp1muuGUi9JnWXpM/r9eA9TC3CriPbZ8E+2H9pPncYmx1hfePoal5qBNGnNHbHBQF235knDNsIhI/rt4a4rKwg== X-Google-Smtp-Source: AGHT+IFZUEjI3XbO1Pn0HhB4r8V5gSpPhuriPgVLKI+2eJRk70+icLJ5r0nIgpmJZ4waeS2L6wU+ X-Received: by 2002:a50:c049:0:b0:574:ebdd:9ab6 with SMTP id 4fb4d7f45d1cf-574ebdd9c5emr26234420a12.6.1716314789926; Tue, 21 May 2024 11:06:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716314789; cv=pass; d=google.com; s=arc-20160816; b=Gdd+c2K2ON82oN1YLODiALBqocCVWhka5Zkp30uEcoNbgkNgK1oPymXuJCrqs0dfor qChzcYx4KWNAqmQYyxoTjYZWg5U4o21nLjl3E4TaJWPQHCW2v0shl+6pYLkckxmQsPrj A3q0gGWoZP8bBGBbuelHbHIyWlnYsAZCg1MiKs+wZGv5DOJKG8EjRnhajJfZGH+bbTD3 qnv/mp/bkztDz5bBWP9qYB+4aD/Af+QMGrpCuLwsUoUGOgOWJpSQHZvwcOTINUqNTw0w qLslgaw3bOWylLRNcyu9Y15iftTZNVgbxJUp5352C6gYwzSEGCSlxLqQdUF1mRNqa5wE R1fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=whlt1Bnhny8LtS/uyW4M7JjDCz3FGkigD6pudiqezR8=; fh=XyHbrYkN3s0Os8+5+7riuoy0gCjTql/ns+Qz7CWY8IA=; b=XGOz57A4H+vOTPkiDNAyEPcXAMrtGUdWXzWEAcMJmTvQeOZQiUgypd3AbCTAQQC0nl WBOrWFtQoe8KwMxvUOTiexiLPExhUZaPUZ6BF2dtiTw6x0iLHwIDkbdMF39dbZWliMYk cuvaspPNzJ2wcVnI7++hlDxlCAgNrMFvSO7F99xRPAdm38bNiKhse8A2IzgPZsV24LKH gdX49oICvIu/9QJCZbPvcOUA7Cz+7g8WSiVVJAbRD/rUJJkZ6qCYX7sujjbULESauY/y g7t78NUnq4XB0ejyIMh4iz50SAW5vt0cth3+z9exgX/LMvjLjt4OpUXCriD65B+UU3As gk6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EByw0BMn; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-185307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185307-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c378122si13860395a12.623.2024.05.21.11.06.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 11:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EByw0BMn; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-185307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185307-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A89601F225E6 for ; Tue, 21 May 2024 18:06:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90EA814430B; Tue, 21 May 2024 18:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="EByw0BMn" Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C77023775 for ; Tue, 21 May 2024 18:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716314780; cv=none; b=IhrSptMn5UcPGNDotVl4La9X6p0YOu/K2zYmgw1uSqGDH2TmWa0ObMj4O9lQ/0O05qxQLE1un6ztodeb/Iih57xm5+A24bYUse1bB7JddbLUpE9qRyt0FPov2F7WE/gtRncDQEyZ8xqkf5oG7ZoUE/LYKl8L4M8RHG2u0Rx/4hE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716314780; c=relaxed/simple; bh=VESUA081O2BuGOzfM9+GtLIpJVbkrvttt9G2fR8/590=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JoOA8p0ws1Zx8N++dS1fvFP8lc33700DyT5cQ5H7Ym4YDoO4cXtIdg3yOFGG2cC78FNtgOeRskeaD42l01HQGqpPfnlprU+BoC3Ni/1zaY35lJHhvz5eqbGZc+fCmI01rUtdPUgU0wsatuscs7r016np5jdQbOde+apSJ37+81s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=EByw0BMn; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e724bc466fso32294941fa.3 for ; Tue, 21 May 2024 11:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1716314776; x=1716919576; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=whlt1Bnhny8LtS/uyW4M7JjDCz3FGkigD6pudiqezR8=; b=EByw0BMnti4DbVy/XjlPhtW1y5PFzSQmqbUj9oz1k0/7IeeqwNAl1VlixzNZ9pypw/ SOBkVQrrcRAc153776SPCK0i9U6FBOGFUoZVWHZcQw6WfH+majyey69VlZiLKiazTOC7 8A6Qs+gFbLeTGXH6GRTVUXDdLQ4/sFJ4rtV3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716314776; x=1716919576; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=whlt1Bnhny8LtS/uyW4M7JjDCz3FGkigD6pudiqezR8=; b=I7H5y0n9CI5RTf13hDZjhH2Zl4uT5nb78zT7tY5unFMNQp3Sb0BxsakNEmX4jEPc2k SRnViT6ezz4UYs/Gdw6CrGSKoYXSevyvXRxU9tFX/RodkQCjyFFhsLg9S8RtEiD6skJG 41NrUwy28pO0QE4os02vrBC/wjFrT9WGah2G7Sp+rV6xCihNwLpMbuodTcuOMTRO31zx 9IdpDb6UoR4VhwUG0fG8bGdfNTB1dW4fUA9ojZWjmTnlD1kr1MUV/kv3V8BvJoNKdVZW vowrHzs3vjvc79VIfjMeRjEzjW1mpPkpZWrj6Ho/fuzdhaItG8FwOwZ2/XkDQ9iaW7Bg Af8A== X-Forwarded-Encrypted: i=1; AJvYcCWmG+tgXCtHveE6Lt4pA79CVtuuYWGcbKX1sfyKPrn5yf8hjaYrEgGQbSEu8nrWxBcwm98GTKTYcCdpVAIjicR2gvdXqp0Gqr5p72NO X-Gm-Message-State: AOJu0YzZ1sx7Z2Mk6+DYfsHkVz9J7wXUQN44LUdCj8lZ78zWwkbjdepr iEHuTHPBssgKM1XXDHmFjlzSjPiAS4FfHeS4EKd1fLw2KkLyQi7I2v3zWYbDaIljy4UfJwIqn/G q6nJABA== X-Received: by 2002:a2e:751:0:b0:2e6:8b17:ca10 with SMTP id 38308e7fff4ca-2e68b17cd3bmr216526811fa.13.1716314776496; Tue, 21 May 2024 11:06:16 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e4d0ce27d9sm37312001fa.40.2024.05.21.11.06.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 May 2024 11:06:15 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-51f71e4970bso6879214e87.2 for ; Tue, 21 May 2024 11:06:15 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUh3xjrF3NPq/H3qxeL+dlPHlwdTxYANPCRvBfpnLnN3YgZ2GJkeRWFOQ4D3+QRtXut7s7lHvqzQ1LAFYAVj+piJxZuJIObpri2Qhvk X-Received: by 2002:ac2:494d:0:b0:51b:4df3:540e with SMTP id 2adb3069b0e04-52210277cfamr27576548e87.65.1716314775318; Tue, 21 May 2024 11:06:15 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Tue, 21 May 2024 11:05:58 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH workqueue/for-6.10-fixes] workqueue: Refactor worker ID formatting and make wq_worker_comm() use full ID string To: Yafang Shao Cc: Tejun Heo , Jan Engelhardt , Craig Small , linux-kernel@vger.kernel.org, Lai Jiangshan Content-Type: text/plain; charset="UTF-8" On Mon, 20 May 2024 at 19:34, Yafang Shao wrote: > > We discussed extending it to 24 characters several years ago [0], but > some userspace tools might break. Well, the fact that we already expose names longer than 16 bytes in /proc means that at least *that* side of it could use an extended comm[] array. Yes, some other interfaces might want to still use a 16-byte limit as the length for the buffers they use (tracing?) but I suspect we could make the comm[] array easily bigger. But what I suspect we should do *first* is to try to get rid of a lot of the "current->comm" users. One of the most common uses is purely for printing, and we could actually just add a new '%p' pointer for printing the current name. That would allow our vsprintf() code to not just use tsk->comm, but to use the full_name for threads etc. So instead of printf("%s ..", tsk->comm..); we could have something like printf("%pc ..", tsk); to print the name of the task. That would get rid of a lot of the bare ->comm[] uses, and then the rest should probably use proper wrappers for copying the data (ie using 'get_task_comm()' etc). That would not only pick up the better names for printk and oopses, it would also make future cleanups simpler (for example, I'd love to get rid of the 'comm' name entirely, and replace it with 'exe_name[24]' and have the compiler just notice when somebody is trying to access 'comm' directly). Linus