From patchwork Fri Jan 15 06:13:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12021565 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87419C433E0 for ; Fri, 15 Jan 2021 06:14:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EE516239EF for ; Fri, 15 Jan 2021 06:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE516239EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8EECF6B019F; Fri, 15 Jan 2021 01:14:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 89D056B01A0; Fri, 15 Jan 2021 01:14:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78BDC6B01A1; Fri, 15 Jan 2021 01:14:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id 5F6C36B019F for ; Fri, 15 Jan 2021 01:14:25 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 204801EE6 for ; Fri, 15 Jan 2021 06:14:25 +0000 (UTC) X-FDA: 77706994890.24.curve14_1e149bf2752d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 082381A4A5 for ; Fri, 15 Jan 2021 06:14:25 +0000 (UTC) X-HE-Tag: curve14_1e149bf2752d X-Filterd-Recvd-Size: 4316 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Jan 2021 06:14:24 +0000 (UTC) Received: by mail-oi1-f170.google.com with SMTP id d203so8563974oia.0 for ; Thu, 14 Jan 2021 22:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KKwFr1jxz/gEFfQmbd7/N6zzrz4bML+8qGHWuqOKZjI=; b=q/Ft/v+R1FLlFN0iNjqmjTi9IZSzoC7hmZDHRhEMjnod0ozlg/gej6U7dAWtu88HRn g9+w62pEwYYOBqXhOVwB+tvbTKr6SwlaOYF+FcC2aWLyltPwdg+WdPehgpNNsa2zIxaK mWQ3PTvperWH1IDzS0FnDgTDK6K4NbyrdSrK/OCiatAmPPNgnpIT/auMoImmDb50ATfW R49TG4ExgRAJaXQofuDegkriJLXQtlbBdiP6/vvVF4lyYNNVz1n8W0PCrJeHznqRtpRW BNYEZ4FrgzLgkbxoDSfonZC8crVVH0h2Pe0cjhSR4i7yzR5aDuHLOzsf5V+CIvn2eszs 2QTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KKwFr1jxz/gEFfQmbd7/N6zzrz4bML+8qGHWuqOKZjI=; b=Umlz3zR4C0NuHHrQ7z8Qc7Y7d7QZEq1h6v4CS1Xj2SJEsxRSmmpIt33I8nz6eOeF8v ED5mHO6vUgP2dhNBvlh4ywLGPufEFUmihZy1peiZnEpaZ0OBwE3HeTbA/pxZzKZX/RFP GdPxz8bt98xxM+HS+6DvRWmYkyIyLNl5J+Gas0Qoxk95+xu/QiEja++Il1Hb4Ma2+7PT +c8qRwiqEftXv/S29XAlNb4ekWWLBK1fZdc3ysVWhC2Kj8aIsFeGBtCCGCIxcapLN8jE D6Zr6qHucEx7itrWKb8Sp5M/Y2nxmDzBHw+FNCs4VI8U/+tV8txxez4Q0oH8i71p330Y LFEg== X-Gm-Message-State: AOAM531j5F5VbMTTS8fq97nXQUkfc8vlbKOURTf0uJgIZBxxLlg8zl3E TXp2h6rvAb1oBdk7BWwe8Jk= X-Google-Smtp-Source: ABdhPJxR2kXMcLIg9seGLNEg39SeXc3vvAJPQWO++twOcH7goVc1UezxfxpVKLXL+ukasHPM6eg3Zw== X-Received: by 2002:aca:4dc3:: with SMTP id a186mr4629446oib.107.1610691264075; Thu, 14 Jan 2021 22:14:24 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id m7sm1586351oou.11.2021.01.14.22.14.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2021 22:14:23 -0800 (PST) From: Yafang Shao To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, willy@infradead.org, hannes@cmpxchg.org, mhocko@suse.com, david@redhat.com, osalvador@suse.de, linmiaohe@huawei.com, steven.price@arm.com, guro@fb.com, alexander.h.duyck@linux.intel.com, ying.huang@intel.com Cc: linux-mm@kvack.org, Yafang Shao Subject: [PATCH 1/2] mm, slub: use pGp to print page flags Date: Fri, 15 Jan 2021 14:13:48 +0800 Message-Id: <20210115061349.67386-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210115061349.67386-1-laoar.shao@gmail.com> References: <20210115061349.67386-1-laoar.shao@gmail.com> MIME-Version: 1.0 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: As pGp has been already introduced in printk, we'd better use it to make the output human readable. Before this change, the output is, [ 6155.716018] INFO: Slab 0x000000004027dd4f objects=33 used=3 fp=0x000000008cd1579c flags=0x17ffffc0010200 While after this change, the output is, [ 8846.517809] INFO: Slab 0x00000000f42a2c60 objects=33 used=3 fp=0x0000000060d32ca8 flags=0x17ffffc0010200(slab|head) Signed-off-by: Yafang Shao Reviewed-by: David Hildenbrand --- mm/slub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index dc5b42e..901a45a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -641,8 +641,9 @@ void print_tracking(struct kmem_cache *s, void *object) static void print_page_info(struct page *page) { - pr_err("INFO: Slab 0x%p objects=%u used=%u fp=0x%p flags=0x%04lx\n", - page, page->objects, page->inuse, page->freelist, page->flags); + pr_err("INFO: Slab 0x%p objects=%u used=%u fp=0x%p flags=%#lx(%pGp)\n", + page, page->objects, page->inuse, page->freelist, + page->flags, &page->flags); }