From patchwork Tue Feb 9 10:56:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12077757 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 6DF64C433DB for ; Tue, 9 Feb 2021 10:56:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D2F6164E56 for ; Tue, 9 Feb 2021 10:56:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2F6164E56 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 5649B6B006C; Tue, 9 Feb 2021 05:56:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 53BD16B006E; Tue, 9 Feb 2021 05:56:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 451316B0070; Tue, 9 Feb 2021 05:56:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 2C0B76B006C for ; Tue, 9 Feb 2021 05:56:43 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DD8F9A74B for ; Tue, 9 Feb 2021 10:56:42 +0000 (UTC) X-FDA: 77798426244.14.bear10_59038a727606 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id BDD161807DD3C for ; Tue, 9 Feb 2021 10:56:42 +0000 (UTC) X-HE-Tag: bear10_59038a727606 X-Filterd-Recvd-Size: 4639 Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 10:56:42 +0000 (UTC) Received: by mail-ot1-f54.google.com with SMTP id e5so10226297otb.11 for ; Tue, 09 Feb 2021 02:56:42 -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=Y+87jDlelvAkmlccbbsaH9fufNQh8avTEY3L9pDsVQ4=; b=kOuKcCAoSI3K+pZ1OOigFzQmL/D1AGodIfTC5qH7C+a17cdSLZ+34W+s58QIpBZBd7 3p6G0oXARZUvPrUXY9oEM50P7StY6h7jW4hsT+6yKaFj5oshU/8SSHS8bcNocWW87FqZ y7VyHxI/NDL5D67ernOa8S2nl582y+xc4aeyAVDbaP95CJG3VWnxleiRmebbXSPqb58O 0hRg5R1oiENyFqG8J0dnBNfyW98qfTvHzEpw0u/K71rD/db3evICvlQaFzUJ17zljxTV 6FBbgr6QjPZTiV9exzfv2j0/PUR14UC8pUYXl5QV53BHEsR4b7P+44FIUBEWLX+wp8M4 C4OQ== 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=Y+87jDlelvAkmlccbbsaH9fufNQh8avTEY3L9pDsVQ4=; b=ArCseRzCwZwUqGyYQgCK8OJ4kiH4awbJjAF/voCL3Y79GfAx6LE7eGIP37L/ZcBLRk wB0Y9/hlZGvIda2QO8lUxYSyauoubR8GuEKGddoC/B8q4dvIfnqsgTTh4QI0YmndWB6D vhtF5fYVtTCa3PVWNICl89rSUI+VnCRGb49DaHSPVqI4JJnUcVBx4TZqYSzIBnaVLGX7 mt96VKL7yFj0IkyM7ia+l4gZw9XjWY1cPJZWIX7Le3AUIvu+3y8qgz4bCRYG8t4cy1rv irxlIDoVwyap8KYpB00KmuTzGgGgXDDR+f4ypu4FN4TaNfXFY9zU9dikzw+yyfV0noy2 3j3Q== X-Gm-Message-State: AOAM533t7/Ye7OAC8Gp4Y/olOhyoLnwJqZzleb9iijSG6rlwfbYqXX+L tKtdUt+c/OEjWe9EfptWExc= X-Google-Smtp-Source: ABdhPJwZ1E2WR8O8CEosYvCwLy1nVVpYDf1qJZ1fbJYyM7jJKanz/+mkswKuU5F9rw/bpVBI1OblIg== X-Received: by 2002:a9d:30f:: with SMTP id 15mr15715024otv.212.1612868201816; Tue, 09 Feb 2021 02:56:41 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id g3sm4171377ooi.28.2021.02.09.02.56.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2021 02:56:41 -0800 (PST) From: Yafang Shao To: 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, 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 v4 1/3] mm, slub: use pGp to print page flags Date: Tue, 9 Feb 2021 18:56:11 +0800 Message-Id: <20210209105613.42747-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210209105613.42747-1-laoar.shao@gmail.com> References: <20210209105613.42747-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: David Hildenbrand --- 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); }