From patchwork Mon Feb 8 10:14:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12074777 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,URIBL_BLOCKED, 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 C427DC433E0 for ; Mon, 8 Feb 2021 10:15:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 516F464DE8 for ; Mon, 8 Feb 2021 10:15:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 516F464DE8 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 B6C3C6B006C; Mon, 8 Feb 2021 05:15:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B44196B006E; Mon, 8 Feb 2021 05:15:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A59BF6B0070; Mon, 8 Feb 2021 05:15:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 904716B006C for ; Mon, 8 Feb 2021 05:15:10 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 596078249980 for ; Mon, 8 Feb 2021 10:15:10 +0000 (UTC) X-FDA: 77794692780.26.show24_2d1513f275fd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 35B761804B656 for ; Mon, 8 Feb 2021 10:15:10 +0000 (UTC) X-HE-Tag: show24_2d1513f275fd X-Filterd-Recvd-Size: 4531 Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Feb 2021 10:15:09 +0000 (UTC) Received: by mail-ot1-f43.google.com with SMTP id i20so13657364otl.7 for ; Mon, 08 Feb 2021 02:15:09 -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=AfzWei4umlGVQDuzDsu/6vxC6VqYoM19+5981ukNvio=; b=f747CuabzW6jNHZmUHMnJFaY9lfhzlNIpY/CW3aucW05mfIRlJI06OKmbh3oFbo28o K8w14VbfkqpQYBvM4wZDQPTGsm4rgqus+hLTuSS1NvDMZOfTccJ94JSJLqXxMsqYH9G/ yELGoNhfoJ0QcmTUDZfabkygXTmCThBq9z0LKkt0LoMMD7BqZ0j/rtXSht5TxZ7Tv22m QBXu7/9tci11r5a6OB11h1rFox3bn/jJ/iv5/f2kf71gBgB0z/MRxOSAMICo3OcJea9S +hUcaFWS76E6oz5kFrmXUfXqLKQaj6k0FQV0ZZxX6yhalplMMBbId+2AirlLhOibyrpc lvmw== 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=AfzWei4umlGVQDuzDsu/6vxC6VqYoM19+5981ukNvio=; b=eOchbO2Uh1E22n75QM0Yzp3Ue37c6T0xkF/Zq6r3AqA+kTZWot6TA3aoE/noPH+jqQ nHil3ExxSrsz1S0701F23C1540dE9Ara4OeDyPMfqPuRphZxBcq1PIl3m7xOHrUztW9y NnTpF4QREcDAX5U5sWgSJH7TTN93uOo5KR0GZux+oHDx8k6KguWKRjpv66WP6U9TvTl6 flkc5t3y2+FUB8SsOafQaaUH6vRbdYxJSzZy/xhHRy92Y/AavWXS0b+qzF+mbYWvTvUK +xeXrXIUbW0ejktROeeezT1vCRCec6JEr6PW2UqdVkdbPjZC//HCw+/uBIGHs82k6dgs 2qtA== X-Gm-Message-State: AOAM530xCyhDFo+mMB9ypxwVnsMb/eJjbb4HkCBEioWDrB5UCOZTOBcQ LtbeQjCSYVBGQeAmGraT3dc= X-Google-Smtp-Source: ABdhPJzIcYkSTcrgXQFDdnYYRK99jagCTwAnxOCgJDgXzdOQkUEOoLXdzrnsr5Hde1YeF151SZy4gw== X-Received: by 2002:a9d:71c6:: with SMTP id z6mr12266305otj.276.1612779309010; Mon, 08 Feb 2021 02:15:09 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id t3sm607226otb.36.2021.02.08.02.15.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2021 02:15:08 -0800 (PST) From: Yafang Shao To: andriy.shevchenko@linux.intel.com, david@redhat.com, vbabka@suse.cz, willy@infradead.org, cl@linux.com, linmiaohe@huawei.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, joe@perches.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH v3 1/3] mm, slub: use pGp to print page flags Date: Mon, 8 Feb 2021 18:14:37 +0800 Message-Id: <20210208101439.55474-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210208101439.55474-1-laoar.shao@gmail.com> References: <20210208101439.55474-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) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Signed-off-by: Yafang Shao Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Miaohe Lin --- mm/slub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 34dcc09e2ec9..87ff086e68a4 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -638,8 +638,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); }