From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5914C433EF for ; Mon, 25 Oct 2021 21:05:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFB4661078 for ; Mon, 25 Oct 2021 21:05:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234163AbhJYVHd (ORCPT ); Mon, 25 Oct 2021 17:07:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:38924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbhJYVHc (ORCPT ); Mon, 25 Oct 2021 17:07:32 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8C80961073; Mon, 25 Oct 2021 21:05:06 +0000 (UTC) Date: Mon, 25 Oct 2021 17:05:03 -0400 From: Steven Rostedt To: Alexei Starovoitov Cc: Yafang Shao , Andrew Morton , Kees Cook , Mathieu Desnoyers , Arnaldo Carvalho de Melo , Petr Mladek , Peter Zijlstra , Alexander Viro , Valentin Schneider , "Zhang, Qiang" , robdclark@chromium.org, Christian Brauner , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Vincent Guittot , "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , dennis.dalessandro@cornelisnetworks.com, mike.marciniszyn@cornelisnetworks.com, Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, Network Development , bpf , linux-perf-users@vger.kernel.org, Linux-Fsdevel , linux-mm , LKML , kernel test robot , kbuild test robot Subject: Re: [PATCH v6 00/12] extend task comm from 16 to 24 Message-ID: <20211025170503.59830a43@gandalf.local.home> In-Reply-To: References: <20211025083315.4752-1-laoar.shao@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Mon, 25 Oct 2021 11:10:09 -0700 Alexei Starovoitov wrote: > It looks like a churn that doesn't really address the problem. > If we were to allow long names then make it into a pointer and use 16 byte > as an optimized storage for short names. Any longer name would be a pointer. > In other words make it similar to dentry->d_iname. That would be quite a bigger undertaking too, as it is assumed throughout the kernel that the task->comm is TASK_COMM_LEN and is nul terminated. And most locations that save the comm simply use a fixed size string of TASK_COMM_LEN. Not saying its not feasible, but it would require a lot more analysis of the impact by changing such a fundamental part of task struct from a static to something requiring allocation. Unless you are suggesting that we truncate like normal the 16 byte names (to a max of 15 characters), and add a way to hold the entire name for those locations that understand it. -- Steve