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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D033EC433EF for ; Mon, 31 Jan 2022 21:46:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39D758D0024; Mon, 31 Jan 2022 16:46:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 34D2A6B011F; Mon, 31 Jan 2022 16:46:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1ED6C8D0024; Mon, 31 Jan 2022 16:46:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 0C9576B011E for ; Mon, 31 Jan 2022 16:46:35 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A4CF518210E84 for ; Mon, 31 Jan 2022 21:46:34 +0000 (UTC) X-FDA: 79091916708.29.CD1B9F9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 31AA140003 for ; Mon, 31 Jan 2022 21:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643665593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lrfhAK5TTZj4g7edUXER7YgS33zywQPgQldaDuFqoqY=; b=XBIrVYYT3+A9xMLR1NVT5MK/Xxu1o0eobkrwgH9JJf92XC4QN2B7yUALOOt8MdO2bejINa 89/I5ZUDenBxycklYEcCsmyESF+OBO44dggaak+pN0lr/iLADWrB6VStJCrVfR9wQaKmto zGYWvCn4jYSRbhNLjk6gnK54Ov6obKo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-442-Gq8PbYdIPL29PDftlnn-kA-1; Mon, 31 Jan 2022 16:46:32 -0500 X-MC-Unique: Gq8PbYdIPL29PDftlnn-kA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D63C2190B2A0; Mon, 31 Jan 2022 21:46:29 +0000 (UTC) Received: from [10.22.16.244] (unknown [10.22.16.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id D44F16AB95; Mon, 31 Jan 2022 21:46:27 +0000 (UTC) Message-ID: <12f62103-d0e9-3010-4c7b-7b80f086734d@redhat.com> Date: Mon, 31 Jan 2022 16:46:27 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v3 4/4] mm/page_owner: Record task command name Content-Language: en-US To: Roman Gushchin Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Mike Rapoport , David Rientjes , Rafael Aquini References: <20220131192308.608837-1-longman@redhat.com> <20220131192308.608837-5-longman@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Stat-Signature: sjr6jh6rrg9jc1a9bpggoy6j7j37cgca X-Rspam-User: nil Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=XBIrVYYT; spf=none (imf12.hostedemail.com: domain of longman@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=longman@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 31AA140003 X-HE-Tag: 1643665594-401656 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 1/31/22 15:54, Roman Gushchin wrote: > On Mon, Jan 31, 2022 at 02:23:08PM -0500, Waiman Long wrote: >> The page_owner information currently includes the pid of the calling >> task. That is useful as long as the task is still running. Otherwise, >> the number is meaningless. To have more information about the allocating >> tasks that had exited by the time the page_owner information is >> retrieved, we need to store the command name of the task. >> >> Add a new comm field into page_owner structure to store the command name >> and display it when the page_owner information is retrieved. Only the >> first 15 characters of the command name will be copied, but that should >> be enough in most cases. Even for those commands with longer names, >> it shouldn't be hard to guess what they are. >> >> Signed-off-by: Waiman Long >> --- >> mm/page_owner.c | 16 ++++++++++++---- >> 1 file changed, 12 insertions(+), 4 deletions(-) >> >> diff --git a/mm/page_owner.c b/mm/page_owner.c >> index a471c74c7fe0..8b2b381fd986 100644 >> --- a/mm/page_owner.c >> +++ b/mm/page_owner.c >> @@ -20,6 +20,7 @@ >> * to use off stack temporal storage >> */ >> #define PAGE_OWNER_STACK_DEPTH (16) >> +#define PAGE_OWNER_COMM_LEN 16 > Not sure I understand why not simply use TASK_COMM_LEN ? Yes, you are right. I thought TASK_COMM_LEN is larger than 16 without actually checking it. Will fix that. Cheers, Longman