From patchwork Mon Feb 15 15:51:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12088643 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 1CBA9C433E0 for ; Mon, 15 Feb 2021 15:53:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3F2A61494 for ; Mon, 15 Feb 2021 15:53:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3F2A61494 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 3F27D8D011A; Mon, 15 Feb 2021 10:53:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3CA338D00FD; Mon, 15 Feb 2021 10:53:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E11A8D011A; Mon, 15 Feb 2021 10:53:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 17BFF8D00FD for ; Mon, 15 Feb 2021 10:53:09 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C56C78157 for ; Mon, 15 Feb 2021 15:53:08 +0000 (UTC) X-FDA: 77820946056.25.son58_400875f2763c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 98F701801E360 for ; Mon, 15 Feb 2021 15:53:08 +0000 (UTC) X-HE-Tag: son58_400875f2763c X-Filterd-Recvd-Size: 4764 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Mon, 15 Feb 2021 15:53:08 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id o21so4408627pgn.12 for ; Mon, 15 Feb 2021 07:53:08 -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=lMogc+88WyQtKfJD7auvy+h4i72decXJNUKFaJ3X740=; b=f1k2NYrwwh8xNqd+o6sELNC/Xmn6BqejfYUsOdc/hz0lBUnnqJbmZ6ctx3UFqArygT 17RseW+oVDoiLEI7HMJNK21OEjCqDymgNg0x7NUkKvm3mqEJUMMFTqwXVTreKYEAMaVn NT5WTNjazDqjE6gbKospAb/bP2MIm/2KO7K6DQSVS5pmtIVQ/fk0y3P2Z44fyk9cSNfI 6m8XtvcXoTYU4Ar6eV8caQZzWuWCgbAMi/hIpyAapvGN0W22M84wPxIq+wI/kmalhFX0 Xk5B8uoaiiAyioEjYb+3HBMPnnn5+dfTuIvRTn/InmeIAUyoc+4DkOZkJyM3wksC3W91 WFXQ== 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=lMogc+88WyQtKfJD7auvy+h4i72decXJNUKFaJ3X740=; b=h83JBP4BuJu8r2a9P/cGn1gGsD09tlhYD8b2I+ksW0BXktUbddRv8i5lI8uYNdFQtI h1qWx1E8XUFqpobhaZprH12lKs/R32QXlL+MXd1Qk3+In8wSdmzczt4oQGgKyG28UgY/ BYJFjixDgi7WaHznntCd4O358DBIzQuWhfSQ/nKXubaG7ep6ty1MhWCgFCU1MLnnYpkE ggg0xuiFg5Xl9T/GUH4j1XIwKgUsEFdOaLR04w0+Nd9PMdFgoWtxxLnpwdeKlB2vTGEC lQBE6zm5wve0tvRUlL535QO7Z3bY1JqG7flvS5k4guWDSr+lf/ld2+1W9WsSYJWbK217 YurA== X-Gm-Message-State: AOAM531mFJHBeLmUxIVhYUNr/GDdN6AlqnGyx1cQWO51rNaPswpSsKXP mj5bUEeJjM76yBDsCZgLbX0= X-Google-Smtp-Source: ABdhPJzyd3xnuMeGDrvMoMMEnluGJNTY+zKXAvszGpcjAWV7U3QqkpZ5CMs1fRYSM3tyK5jr+hTz/Q== X-Received: by 2002:a62:3852:0:b029:1da:7238:1cb1 with SMTP id f79-20020a6238520000b02901da72381cb1mr15988342pfa.11.1613404387231; Mon, 15 Feb 2021 07:53:07 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id i1sm19771215pfq.158.2021.02.15.07.53.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Feb 2021 07:53:06 -0800 (PST) From: Yafang Shao To: pmladek@suse.com, willy@infradead.org, andriy.shevchenko@linux.intel.com, david@redhat.com, linmiaohe@huawei.com, vbabka@suse.cz, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, joe@perches.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH v5 1/3] mm, slub: use pGp to print page flags Date: Mon, 15 Feb 2021 23:51:39 +0800 Message-Id: <20210215155141.47432-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210215155141.47432-1-laoar.shao@gmail.com> References: <20210215155141.47432-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 Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Miaohe Lin Reviewed-by: Andy Shevchenko --- mm/slub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 7ecbbbe5bc0c..ddd429832577 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); }