From nobody Mon Jun 29 23:23:18 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C1DCC433F5 for ; Mon, 31 Jan 2022 19:23:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359870AbiAaTXg (ORCPT ); Mon, 31 Jan 2022 14:23:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22493 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359611AbiAaTX3 (ORCPT ); Mon, 31 Jan 2022 14:23:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643657009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FSCcYBtevS72h8Rb3ThNAKipb4CG2TPJPslkwwiiaHA=; b=T7+7A5qBcT0tCDjr5jxQo9x1JJajuu+q3CWKm45Thyeg6t1c/xVWS0coILh2wH6NPoc7EI Yn5qMfB2+dVb23j/5wpyoeu1enOuIxLV0kx8fDnTLuDClBc+rRHstXeEcleA1MSUWRNxCV 4uqkB0F+VeIGxeBJo2NYKRSDGG0cyYI= 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-520-abdKjMwNOGWccPAZQ_acdA-1; Mon, 31 Jan 2022 14:23:25 -0500 X-MC-Unique: abdKjMwNOGWccPAZQ_acdA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81D351006AA0; Mon, 31 Jan 2022 19:23:23 +0000 (UTC) Received: from llong.com (unknown [10.22.16.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 567BD10001AF; Mon, 31 Jan 2022 19:23:21 +0000 (UTC) From: Waiman Long To: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Mike Rapoport , David Rientjes , Roman Gushchin , Rafael Aquini , Waiman Long Subject: [PATCH v3 1/4] lib/vsprintf: Avoid redundant work with 0 size Date: Mon, 31 Jan 2022 14:23:05 -0500 Message-Id: <20220131192308.608837-2-longman@redhat.com> In-Reply-To: <20220131192308.608837-1-longman@redhat.com> References: <20220131192308.608837-1-longman@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" For *scnprintf(), vsnprintf() is always called even if the input size is 0. That is a waste of time, so just return 0 in this case. Note that vsnprintf() will never return -1 to indicate an error. So skipping the call to vsnprintf() when size is 0 will have no functional impact at all. Signed-off-by: Waiman Long Acked-by: David Rientjes Reviewed-by: Sergey Senozhatsky Acked-by: Roman Gushchin Acked-by: Mike Rapoport --- lib/vsprintf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 3b8129dd374c..d419154b47bb 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -2895,13 +2895,15 @@ int vscnprintf(char *buf, size_t size, const char *= fmt, va_list args) { int i; =20 + if (unlikely(!size)) + return 0; + i =3D vsnprintf(buf, size, fmt, args); =20 if (likely(i < size)) return i; - if (size !=3D 0) - return size - 1; - return 0; + + return size - 1; } EXPORT_SYMBOL(vscnprintf); =20 --=20 2.27.0 From nobody Mon Jun 29 23:23:18 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CE5AC433EF for ; Mon, 31 Jan 2022 19:23:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359836AbiAaTXp (ORCPT ); Mon, 31 Jan 2022 14:23:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23598 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359665AbiAaTXc (ORCPT ); Mon, 31 Jan 2022 14:23:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643657011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aswR5jLflKHAA/2KWO7s8HDPhJp/8ybDJLjB9qtlMrw=; b=G5r/QS/v1hsrHgOhMUdIpqHSOMwzmn20qrK5u3oFkt5JRvgfyzRRwoTubUlmXKrkwtNMfL Hh28F2z9ZHPXOzIWaihXMuHpG+s0g04yLKMPXKMgwW6yqUIqf9kVO46gu4Ubvk0CaV/+r2 2QmiOYd36+0qv4G69FBtOJbDe1T4Nag= 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-156-ZSd268VyPNOMiE_qXzRP3A-1; Mon, 31 Jan 2022 14:23:28 -0500 X-MC-Unique: ZSd268VyPNOMiE_qXzRP3A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C71591083F68; Mon, 31 Jan 2022 19:23:25 +0000 (UTC) Received: from llong.com (unknown [10.22.16.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADF7210013C1; Mon, 31 Jan 2022 19:23:23 +0000 (UTC) From: Waiman Long To: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Mike Rapoport , David Rientjes , Roman Gushchin , Rafael Aquini , Waiman Long Subject: [PATCH v3 2/4] mm/page_owner: Use scnprintf() to avoid excessive buffer overrun check Date: Mon, 31 Jan 2022 14:23:06 -0500 Message-Id: <20220131192308.608837-3-longman@redhat.com> In-Reply-To: <20220131192308.608837-1-longman@redhat.com> References: <20220131192308.608837-1-longman@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The snprintf() function can return a length greater than the given input size. That will require a check for buffer overrun after each invocation of snprintf(). scnprintf(), on the other hand, will never return a greater length. By using scnprintf() in selected places, we can avoid some buffer overrun checks except after stack_depot_snprint() and after the last snprintf(). Signed-off-by: Waiman Long Acked-by: David Rientjes Reviewed-by: Sergey Senozhatsky --- mm/page_owner.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 99e360df9465..28dac73e0542 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -338,19 +338,16 @@ print_page_owner(char __user *buf, size_t count, unsi= gned long pfn, if (!kbuf) return -ENOMEM; =20 - ret =3D snprintf(kbuf, count, + ret =3D scnprintf(kbuf, count, "Page allocated via order %u, mask %#x(%pGg), pid %d, ts %llu ns, free_= ts %llu ns\n", page_owner->order, page_owner->gfp_mask, &page_owner->gfp_mask, page_owner->pid, page_owner->ts_nsec, page_owner->free_ts_nsec); =20 - if (ret >=3D count) - goto err; - /* Print information relevant to grouping pages by mobility */ pageblock_mt =3D get_pageblock_migratetype(page); page_mt =3D gfp_migratetype(page_owner->gfp_mask); - ret +=3D snprintf(kbuf + ret, count - ret, + ret +=3D scnprintf(kbuf + ret, count - ret, "PFN %lu type %s Block %lu type %s Flags %pGp\n", pfn, migratetype_names[page_mt], @@ -358,19 +355,14 @@ print_page_owner(char __user *buf, size_t count, unsi= gned long pfn, migratetype_names[pageblock_mt], &page->flags); =20 - if (ret >=3D count) - goto err; - ret +=3D stack_depot_snprint(handle, kbuf + ret, count - ret, 0); if (ret >=3D count) goto err; =20 if (page_owner->last_migrate_reason !=3D -1) { - ret +=3D snprintf(kbuf + ret, count - ret, + ret +=3D scnprintf(kbuf + ret, count - ret, "Page has been migrated, last migrate reason: %s\n", migrate_reason_names[page_owner->last_migrate_reason]); - if (ret >=3D count) - goto err; } =20 ret +=3D snprintf(kbuf + ret, count - ret, "\n"); --=20 2.27.0 From nobody Mon Jun 29 23:23:18 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0952C433F5 for ; Mon, 31 Jan 2022 19:23:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376330AbiAaTXr (ORCPT ); Mon, 31 Jan 2022 14:23:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38221 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359730AbiAaTXe (ORCPT ); Mon, 31 Jan 2022 14:23:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643657013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AqKO5lknN2+Nsr0yWLMZlCagaD5YFaBIvpU1YV0vjJ8=; b=D5HLeURrdhU7FmHdatBQz2nXIU/paVkcnKNrmYr7x6cyBCsqvRlnlzKJSZKENfKsV/8Hce 4Sf/23xr9hAOFaK7MpItlMXai9OCwvRw5lQf3YW78dh3hsfqZgJJNDUwDsWqCHqinJ3B4U xzoQ+uyYhiysfdaNt4lkdenE7pR4bjE= 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-378-YH4BwOw-OHeQDi8OdBzUZA-1; Mon, 31 Jan 2022 14:23:30 -0500 X-MC-Unique: YH4BwOw-OHeQDi8OdBzUZA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 19CB48143E5; Mon, 31 Jan 2022 19:23:28 +0000 (UTC) Received: from llong.com (unknown [10.22.16.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id F296D10013C1; Mon, 31 Jan 2022 19:23:25 +0000 (UTC) From: Waiman Long To: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Mike Rapoport , David Rientjes , Roman Gushchin , Rafael Aquini , Waiman Long Subject: [PATCH v3 3/4] mm/page_owner: Print memcg information Date: Mon, 31 Jan 2022 14:23:07 -0500 Message-Id: <20220131192308.608837-4-longman@redhat.com> In-Reply-To: <20220131192308.608837-1-longman@redhat.com> References: <20220131192308.608837-1-longman@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It was found that a number of offlined memcgs were not freed because they were pinned by some charged pages that were present. Even "echo 1 > /proc/sys/vm/drop_caches" wasn't able to free those pages. These offlined but not freed memcgs tend to increase in number over time with the side effect that percpu memory consumption as shown in /proc/meminfo also increases over time. In order to find out more information about those pages that pin offlined memcgs, the page_owner feature is extended to print memory cgroup information especially whether the cgroup is offlined or not. Signed-off-by: Waiman Long Acked-by: David Rientjes --- mm/page_owner.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/mm/page_owner.c b/mm/page_owner.c index 28dac73e0542..a471c74c7fe0 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -10,6 +10,7 @@ #include #include #include +#include #include =20 #include "internal.h" @@ -325,6 +326,42 @@ void pagetypeinfo_showmixedcount_print(struct seq_file= *m, seq_putc(m, '\n'); } =20 +#ifdef CONFIG_MEMCG +/* + * Looking for memcg information and print it out + */ +static inline void print_page_owner_memcg(char *kbuf, size_t count, int *p= ret, + struct page *page) +{ + unsigned long memcg_data =3D READ_ONCE(page->memcg_data); + struct mem_cgroup *memcg; + bool onlined; + char name[80]; + + if (!memcg_data) + return; + + if (memcg_data & MEMCG_DATA_OBJCGS) + *pret +=3D scnprintf(kbuf + *pret, count - *pret, + "Slab cache page\n"); + + memcg =3D page_memcg_check(page); + if (!memcg) + return; + + onlined =3D (memcg->css.flags & CSS_ONLINE); + cgroup_name(memcg->css.cgroup, name, sizeof(name)); + *pret +=3D scnprintf(kbuf + *pret, count - *pret, + "Charged %sto %smemcg %s\n", + PageMemcgKmem(page) ? "(via objcg) " : "", + onlined ? "" : "offlined ", + name); +} +#else /* CONFIG_MEMCG */ +static inline void print_page_owner_memcg(char *kbuf, size_t count, int *p= ret, + struct page *page) { } +#endif /* CONFIG_MEMCG */ + static ssize_t print_page_owner(char __user *buf, size_t count, unsigned long pfn, struct page *page, struct page_owner *page_owner, @@ -365,6 +402,8 @@ print_page_owner(char __user *buf, size_t count, unsign= ed long pfn, migrate_reason_names[page_owner->last_migrate_reason]); } =20 + print_page_owner_memcg(kbuf, count, &ret, page); + ret +=3D snprintf(kbuf + ret, count - ret, "\n"); if (ret >=3D count) goto err; --=20 2.27.0 From nobody Mon Jun 29 23:23:18 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 324DBC433EF for ; Mon, 31 Jan 2022 19:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359860AbiAaTXt (ORCPT ); Mon, 31 Jan 2022 14:23:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51325 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376304AbiAaTXi (ORCPT ); Mon, 31 Jan 2022 14:23:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643657017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0Xg9VDn8wGaFMcda+Zs1goFaj5CYRr9QqJudVlDax4M=; b=RAQpvnKq5d/hv2m15Bm6EfoABIpQO1n2OiBUanKyomEXfgAZ1kI2IYKSr0lgz+sLC9kljM a6X2YojZdQIXc9A4SD5kdMieWmf3HBP1RC2lXhLf4h3aaYXGYx0vst2d2EZdpBxIZUHN2l qAMCXvD6ZDzbVjOmC+FXhjn4F1Vi88U= 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-104-AuHzqSQZMpyaJnb7UlIgPQ-1; Mon, 31 Jan 2022 14:23:34 -0500 X-MC-Unique: AuHzqSQZMpyaJnb7UlIgPQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61EF839384; Mon, 31 Jan 2022 19:23:30 +0000 (UTC) Received: from llong.com (unknown [10.22.16.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4427110013C1; Mon, 31 Jan 2022 19:23:28 +0000 (UTC) From: Waiman Long To: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Mike Rapoport , David Rientjes , Roman Gushchin , Rafael Aquini , Waiman Long Subject: [PATCH v3 4/4] mm/page_owner: Record task command name Date: Mon, 31 Jan 2022 14:23:08 -0500 Message-Id: <20220131192308.608837-5-longman@redhat.com> In-Reply-To: <20220131192308.608837-1-longman@redhat.com> References: <20220131192308.608837-1-longman@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =20 struct page_owner { unsigned short order; @@ -29,6 +30,7 @@ struct page_owner { depot_stack_handle_t free_handle; u64 ts_nsec; u64 free_ts_nsec; + char comm[PAGE_OWNER_COMM_LEN]; pid_t pid; }; =20 @@ -146,6 +148,7 @@ void __reset_page_owner(struct page *page, unsigned sho= rt order) page_owner =3D get_page_owner(page_ext); page_owner->free_handle =3D handle; page_owner->free_ts_nsec =3D free_ts_nsec; + page_owner->comm[0] =3D '\0'; page_ext =3D page_ext_next(page_ext); } } @@ -165,6 +168,8 @@ static inline void __set_page_owner_handle(struct page_= ext *page_ext, page_owner->last_migrate_reason =3D -1; page_owner->pid =3D current->pid; page_owner->ts_nsec =3D local_clock(); + strlcpy(page_owner->comm, current->comm, + sizeof(page_owner->comm)); __set_bit(PAGE_EXT_OWNER, &page_ext->flags); __set_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags); =20 @@ -232,6 +237,7 @@ void __folio_copy_owner(struct folio *newfolio, struct = folio *old) new_page_owner->pid =3D old_page_owner->pid; new_page_owner->ts_nsec =3D old_page_owner->ts_nsec; new_page_owner->free_ts_nsec =3D old_page_owner->ts_nsec; + strcpy(new_page_owner->comm, old_page_owner->comm); =20 /* * We don't clear the bit on the old folio as it's going to be freed @@ -376,10 +382,11 @@ print_page_owner(char __user *buf, size_t count, unsi= gned long pfn, return -ENOMEM; =20 ret =3D scnprintf(kbuf, count, - "Page allocated via order %u, mask %#x(%pGg), pid %d, ts %llu ns, free_= ts %llu ns\n", + "Page allocated via order %u, mask %#x(%pGg), pid %d (%s), ts %llu ns, = free_ts %llu ns\n", page_owner->order, page_owner->gfp_mask, &page_owner->gfp_mask, page_owner->pid, - page_owner->ts_nsec, page_owner->free_ts_nsec); + page_owner->comm, page_owner->ts_nsec, + page_owner->free_ts_nsec); =20 /* Print information relevant to grouping pages by mobility */ pageblock_mt =3D get_pageblock_migratetype(page); @@ -446,9 +453,10 @@ void __dump_page_owner(const struct page *page) else pr_alert("page_owner tracks the page as freed\n"); =20 - pr_alert("page last allocated via order %u, migratetype %s, gfp_mask %#x(= %pGg), pid %d, ts %llu, free_ts %llu\n", + pr_alert("page last allocated via order %u, migratetype %s, gfp_mask %#x(= %pGg), pid %d (%s), ts %llu, free_ts %llu\n", page_owner->order, migratetype_names[mt], gfp_mask, &gfp_mask, - page_owner->pid, page_owner->ts_nsec, page_owner->free_ts_nsec); + page_owner->pid, page_owner->comm, page_owner->ts_nsec, + page_owner->free_ts_nsec); =20 handle =3D READ_ONCE(page_owner->handle); if (!handle) --=20 2.27.0