From patchwork Mon Feb 1 11:56:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12058847 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 E7BEFC433DB for ; Mon, 1 Feb 2021 11:56:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5BE2964EA5 for ; Mon, 1 Feb 2021 11:56:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BE2964EA5 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 CDF0C6B0070; Mon, 1 Feb 2021 06:56:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C671C6B0071; Mon, 1 Feb 2021 06:56:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B57C86B0072; Mon, 1 Feb 2021 06:56:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id A14926B0070 for ; Mon, 1 Feb 2021 06:56:57 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 67C133632 for ; Mon, 1 Feb 2021 11:56:57 +0000 (UTC) X-FDA: 77769547674.22.gate98_20027a2275c2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 4968518038E67 for ; Mon, 1 Feb 2021 11:56:57 +0000 (UTC) X-HE-Tag: gate98_20027a2275c2 X-Filterd-Recvd-Size: 4531 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Mon, 1 Feb 2021 11:56:56 +0000 (UTC) Received: by mail-pl1-f175.google.com with SMTP id y10so5587549plk.7 for ; Mon, 01 Feb 2021 03:56:56 -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=hIsvW8P9+uYLezvOEppL2cu9Sms7br/nplzxkf+Uuow=; b=Uu1LJYqpQCre5B6+Qh8vSJ3YYTTxMi+qsQNfArcHITOE2isNcr4A9MTpdxAzQqf+k2 h7LDkqQEiXMOH1oBlo0tMgDj7I98QPAI/Mfd6eTPj+mEK5h2SRAuwpcBx/iESzd08q/6 MeVA4Gge1kXB5Vg6Vlcl9Gk0Hz+HzEGPZyfPm5n7D4QRvflKpphd3oZKJztYx3B6Ljed biyMGx6WhBtwFCSdj2U2Fj6kzZsz02oHVgh+0vxE6bT5qvim6A66rh36lSM5Lsy5Gfl3 uG5F9cDOUuBx/rtHS4C+8iVxwNHPREjdd5Q8dU9VnHPhv2skUx6B5Q+xT419HBEXr/oW K8HQ== 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=hIsvW8P9+uYLezvOEppL2cu9Sms7br/nplzxkf+Uuow=; b=Cu22xkCgtnuFr8UDBA3znZ4B9D2CPl7jKe53Dl/t+/l7ucxuCD1TlexAcz7JOpxAKJ aYwWhOKATn0W1YW7ysgJcQhngyA6NcthPlvtiSg+iENYvrVQYsLxFlS0ynzDujmlkSni jnG1LwMdWoJ3YdXnV8V9ayrcvJ/7keVDHKWiy2gHv/mJ9NpuyXW7WKRwEO6zq9JwiMur aUdVWnLHqzzSVWSOj91JeA7TYO1VYwKSEXKT/maE2mduq+UWzuZTX2x9PBkg31zL8YeM 4gHubzeKXlLusXy/EBU48KsgN66VlRpN/GEyFn4Awz/9RE5A+8WdkbaPJ0SPU98Y+NxB xfFw== X-Gm-Message-State: AOAM5301G6Bahsk0+h3YBnNFv69+Gr9+BC4LMtG3pUBaFnqgx3ZU+9BM wvq/b8kdlh+Gi8WG1L4IcBI= X-Google-Smtp-Source: ABdhPJwotWx0PNovNqXAjWXtfufDcrYYrYEaWnGE6Fjq3aTUQJyyzmhls5TUbA66zs1mkTfD5SvkaA== X-Received: by 2002:a17:903:2292:b029:de:45c0:7005 with SMTP id b18-20020a1709032292b02900de45c07005mr17472088plh.75.1612180615792; Mon, 01 Feb 2021 03:56:55 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id dw23sm7195152pjb.3.2021.02.01.03.56.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2021 03:56:55 -0800 (PST) From: Yafang Shao To: andriy.shevchenko@linux.intel.com, david@redhat.com, vbabka@suse.cz, linmiaohe@huawei.com, cl@linux.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, linux@rasmusvillemoes.dk Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH v2 1/3] mm, slub: use pGp to print page flags Date: Mon, 1 Feb 2021 19:56:08 +0800 Message-Id: <20210201115610.87808-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210201115610.87808-1-laoar.shao@gmail.com> References: <20210201115610.87808-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 Signed-off-by: Yafang Shao --- 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); }