From patchwork Mon Feb 1 11:56:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12058811 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=-8.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_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 AC4ACC433DB for ; Mon, 1 Feb 2021 11:56:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1846E64E95 for ; Mon, 1 Feb 2021 11:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1846E64E95 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 53D8C6B006E; Mon, 1 Feb 2021 06:56:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C66A6B0070; Mon, 1 Feb 2021 06:56:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B6716B0071; Mon, 1 Feb 2021 06:56:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id 22F106B006E for ; Mon, 1 Feb 2021 06:56:48 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DDAB13632 for ; Mon, 1 Feb 2021 11:56:47 +0000 (UTC) X-FDA: 77769547254.06.girl29_2407ef2275c2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id A79D81003E0F7 for ; Mon, 1 Feb 2021 11:56:47 +0000 (UTC) X-HE-Tag: girl29_2407ef2275c2 X-Filterd-Recvd-Size: 4634 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Mon, 1 Feb 2021 11:56:47 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id o63so11897922pgo.6 for ; Mon, 01 Feb 2021 03:56:47 -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:mime-version :content-transfer-encoding; bh=Xbp12Mg2UJJoPH+sHwsE5VabTWCxUoYEw4JlttfR6VM=; b=paSpmXTLvwIdL59W0CknNKBf9I7StZTGlSkGPzyP34sj+mUNTCtmU69LCH2V6l8EYJ ut9GSRjB1nCXBnyYHND7J89IziZ5YpLwf0UEfzCMc6ui4SLFd1cxRzCXAlLpI3L3dYTV BpTSzaovILVkW8e9mn0TBDGlveg1ZUn8oLB+DSGOETiXebTbvAsnJgVTq5IHyxLQJ+TR sysplukWRXWLzt1qo4Ju4t/TLgudo5h9XEiXpDTzxVZJn2U3pPkumL3G+iDTqYwcpMNc DxuQ/3wq4DlbfdQyqH9+uGgmo4AqWUnCn+ZvYl937qO1M43q93SKHNhj19FQw9fFeOYX gWBg== 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:mime-version :content-transfer-encoding; bh=Xbp12Mg2UJJoPH+sHwsE5VabTWCxUoYEw4JlttfR6VM=; b=GMBq+KMDu2kH9I/lu2rgy2IYQCvZQx8KM+X5pXQbI240ci6d102YlPEugiQ5MWEAho 3RU4TL/42/KhszEF25btcjU+YfosBQcsiRSTx0mABj3z9J751GZMlyocPTbiuOFAPjBw ZGKoLkxv+sgY6iIV2g5bAjLWFElUCI3YdXg6LsraoFshEfc4HruQOEXY3krGomQVoLXX 3ecfs6sgrik5zRgbvMIJo4pNJZ8TD3eevMEGUUFmRLqQa3EIRsfMeT68qNsHLE7WjMjU bCwu07j/xFx7MVpZc7v/ZoujzTXPfm0aD03S+FepD+5YkarHPzg7aEU1E/qpbnLQ+nKT VL6Q== X-Gm-Message-State: AOAM532Sag3A7SEByzaCwHKX/FzcMiUtYafH5c95N7IbTvVuZBIzn6qX 9Y32jdUQGMdJdBfHCNfvMtk= X-Google-Smtp-Source: ABdhPJw59ZzWEZzVifiW9Hq2MY1cV9kjKcnaVUATEpfGh2eFT1Wtq4jLrNiCdwKUPyj6qyypFN3kZw== X-Received: by 2002:a63:c64a:: with SMTP id x10mr16739225pgg.14.1612180606410; Mon, 01 Feb 2021 03:56:46 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id dw23sm7195152pjb.3.2021.02.01.03.56.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2021 03:56:45 -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 0/3] mm, vsprintf: dump full information of page flags in pGp Date: Mon, 1 Feb 2021 19:56:07 +0800 Message-Id: <20210201115610.87808-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) 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: Currently the pGp only shows the names of page flags, rather than the full information including section, node, zone, last cpupid and kasan tag. While it is not easy to parse these information manually because there're so many flavors. Let's interpret them in pGp as well. This patchset also includes some code cleanup in mm/slub.c. Below is the example of the output in mm/slub.c. - Before the patchset [ 6155.716018] INFO: Slab 0x000000004027dd4f objects=33 used=3 fp=0x000000008cd1579c flags=0x17ffffc0010200 - After the patchset [ 6871.296131] Slab 0x00000000c0e19a37 objects=33 used=3 fp=0x00000000c4902159 flags=0x17ffffc0010200(Node 0,Zone 2,Lastcpupid 0x1fffff,slab|head) The documentation and test cases of pGp are also updated. Below is the result of the test_printf, [ 5091.307308] test_printf: loaded. [ 5091.308285] test_printf: all 388 tests passed [ 5091.309105] test_printf: unloaded. v2: - various coding improvement, per Joe, Miaohe, Vlastimil and Andy - remove the prefix completely in patch #2, per Vlastimil - Update the test cases, per Andy Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub: don't combine pr_err with INFO vsprintf: dump full information of page flags in pGp Documentation/core-api/printk-formats.rst | 2 +- lib/test_printf.c | 65 ++++++++++++++++++----- lib/vsprintf.c | 58 +++++++++++++++++++- mm/slub.c | 13 ++--- 4 files changed, 116 insertions(+), 22 deletions(-)