Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1335383pxb; Tue, 26 Oct 2021 07:13:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEPUoTTilzBrVDcY2tr6bezCo5KIY+nHVYzbxbdFJy5SVO0qygCIgSvPfyllmQfspIDurC X-Received: by 2002:a17:90b:4b90:: with SMTP id lr16mr24922390pjb.160.1635257637227; Tue, 26 Oct 2021 07:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635257637; cv=none; d=google.com; s=arc-20160816; b=Dy29PdCGiCcDBjRmE84lbcNjFwFnM7zLMbkjEcuAqBKknquKVC0NsDl3jGEkOZED3b eOL9TTakezmErKeS0GSnw34/G786cTTWChKBJ6/YneUenVq2WeJWxyEsIYzYnrmh3tQt PBxmUer0i8eDcPaJYtfi/2vdXJCt3nfYqiv5/p9ZsthNs3o6TL1nzJLdbfkfXwGPWGfI grYN1Uf3/7EqdJzN4liRkPsrU/aNAdOIuk/EwFpzC+O5mkJX18jK/aVfSNMB+tjc2S1T andjfG8esfYOx92q1Fw+Xg3WiNJzcWgM1zddHaLyQx9tCeloqVSR4AcDr3X7lu0Q2JrY 8OIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1eIOwvf/mMVcZwym9Rsv9K70HOPBD5q/9n5lAFwsZyI=; b=Puz44WTsGX+X5LmjCqmecH3D68chN+vi95Co0p/6yB1GOOdP5CFud+ZH+bVuswwWmO hadiKJjwfI5VEu29Sj0CHWIyUHE2NczNStj73fiMxvhDZgQAGHy4liOjdPXkqcglhWIr tEI9H+k6K1FUFeUdm14Dozg2CTvDmNiKGT62J4vKRnRBBF1u9GCPYznf742CO59KERL6 /NOXsgLb49AkZKmRzawzaljLrzQvj0AxPbI3q+srELNZ0h5AHT1RnKdCMrlYK9IxA27/ /fvMaMe53bXcEMS+kPo1BxrWHpKcMzp4vWLR1weNtXy0ZAYNPVxbu6slNKsD5qIAHThe B+Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=INOy8Jbc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v204si13523771pfc.162.2021.10.26.07.13.43; Tue, 26 Oct 2021 07:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=INOy8Jbc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235243AbhJZKix (ORCPT + 99 others); Tue, 26 Oct 2021 06:38:53 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:47904 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234596AbhJZKiU (ORCPT ); Tue, 26 Oct 2021 06:38:20 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id CFCFC1FD4C; Tue, 26 Oct 2021 10:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1635244551; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1eIOwvf/mMVcZwym9Rsv9K70HOPBD5q/9n5lAFwsZyI=; b=INOy8JbcR/E0RvXOtZ9l6kLK4ypy5b76OCI5OckfNKpFgnwhlXjEbmuL3zGAyCw8uxdvjj YSpBGCium6DRcUwhe5EC3/On5TQaGYvsiKMxzDZqBKy4LcBGj5EteMRwpKyc5XDj7AZPwm YDf9opjAXlpbqwZAzKOuC4KIFz3WjkU= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 025E8A3B85; Tue, 26 Oct 2021 10:35:50 +0000 (UTC) Date: Tue, 26 Oct 2021 12:35:47 +0200 From: Petr Mladek To: Steven Rostedt Cc: Alexei Starovoitov , Yafang Shao , Andrew Morton , Kees Cook , Mathieu Desnoyers , Arnaldo Carvalho de Melo , 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: References: <20211025083315.4752-1-laoar.shao@gmail.com> <20211025170503.59830a43@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211025170503.59830a43@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2021-10-25 17:05:03, Steven Rostedt wrote: > 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. I fully agree. The evolution of this patchset clearly shows how many code paths depend on the existing behavior. > 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. Yup. If the problem is only with kthreads, it might be possible to store the pointer into "struct kthread" and update proc_task_name(). It would generalize the solution already used by workqueues. I think that something like this was mentioned in the discussion about v1. Best Regards, Petr