From mboxrd@z Thu Jan 1 00:00:00 1970 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 72961C433E0 for ; Mon, 15 Feb 2021 15:53:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E85BB64DEC for ; Mon, 15 Feb 2021 15:53:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E85BB64DEC 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 330858D0119; Mon, 15 Feb 2021 10:53:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E1168D00FD; Mon, 15 Feb 2021 10:53:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CF448D0119; Mon, 15 Feb 2021 10:53:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 056D18D00FD for ; Mon, 15 Feb 2021 10:53:02 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BB14F8248076 for ; Mon, 15 Feb 2021 15:53:01 +0000 (UTC) X-FDA: 77820945762.27.791B591 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by imf16.hostedemail.com (Postfix) with ESMTP id 7BCC780192CE for ; Mon, 15 Feb 2021 15:53:00 +0000 (UTC) Received: by mail-pj1-f53.google.com with SMTP id cl8so3969019pjb.0 for ; Mon, 15 Feb 2021 07:53:00 -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=S5NBz3621tCfDoAHB0YD9Xyr4a9YK2FafwMqwj93OAQ=; b=gXr622vVwD2Fq5pslnGfzGab8yOA/vH6xE2pYWeyP9+1wuj4Nurwhb1E9zx1aZ1119 HEqstLywmdwzE7SiOoERvmxdrqxr7x3LOIDa5RQGzitrbSqaG8e/Zjo/BAF1zbXvhrdx FpqYH0Zlg93tIhIMKVGHCvUciikM6AW0NgmLbFo6Sqzn3XKpmaK4mPlyOj4atInrUl9o PnJ+biAFbrZkEXZbm1pXfS9+b1y2lSTGmomkkr1nrXyrhI9cLQbDbv7kFyh7tMTV8jIO sQ6/aV4aTWO1Rm8guRhEpkpyLUACNreW6vuC4bMgl8RiUqTJX26t3O+dW6kGSZwcMecj uWFw== 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=S5NBz3621tCfDoAHB0YD9Xyr4a9YK2FafwMqwj93OAQ=; b=GZzkx2wCN2RyNX5dYf8AUe1BkaH/zIf0iIj+9EDzofK59WJcJoD2nfTwssc1/sE2Ne 90sM/HVMKkNsnyQeOaYj7LwUbaGYQi+TFkH4XtY+qJyZsOOs+1sAOocp3kxypZDhP7iY knywuqdkjdDTQ2CTNsuO5K82+8cMZcc3aNfisDlmrVTs0bS5X7s2FZC7NMi7mCUhpGio Ihy9+xnOgk3hWm9k2WMziAy4++la+74zVzSNee98psXh9fdtfpQWyKuQ3uUJXP5DQNRw RrR+11BWHqgWS/X4kmYfMidihilpuKKuEnW2LXxhuJb99z3yA5nppcPkVQ0eRFPgmZzw ghJw== X-Gm-Message-State: AOAM533JVBVBQ4TwOV9rUCgO9SbtCVU84jYCi3w4QYPVphm3wcrjul/W ta7LVLLD10OunuNfuxvcB30= X-Google-Smtp-Source: ABdhPJwHgToC2mZ6+WAa6zGR65EXNpJXug+4KzeQ0rZCr/9brvpPitO99GthcwAoRKJX5b3s+MGE0g== X-Received: by 2002:a17:90a:1f4c:: with SMTP id y12mr16855015pjy.52.1613404380181; Mon, 15 Feb 2021 07:53:00 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id i1sm19771215pfq.158.2021.02.15.07.52.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Feb 2021 07:52:59 -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 0/3] mm, vsprintf: dump full information of page flags in pGp Date: Mon, 15 Feb 2021 23:51:38 +0800 Message-Id: <20210215155141.47432-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Stat-Signature: s77zabq1i1rmzwbhqujq3cgw54mnf6nj X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 7BCC780192CE Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf16; identity=mailfrom; envelope-from=""; helo=mail-pj1-f53.google.com; client-ip=209.85.216.53 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613404380-828193 Content-Transfer-Encoding: quoted-printable 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: The existed pGp shows the names of page flags only, rather than the full information including section, node, zone, last cpuipid and kasan tag. While it is not easy to parse these information manually because there are so many flavors. We'd better interpret them in printf. To be compitable with the existed format of pGp, the new introduced ones also use '|' as the separator, then the user tools parsing pGp won't need to make change, suggested by Matthew. The new added information is tracked onto the end of the existed one, e.g. [ 8838.835456] Slab 0x000000002828b78a objects=3D33 used=3D3 fp=3D0x00000= 000d04efc88 flags=3D0x17ffffc0010200(slab|head|node=3D0|zone=3D2|lastcpup= id=3D0x1fffff) The documentation and test cases are also updated. The result of the=20 test cases as follows, [11585.830272] test_printf: loaded. [11585.830454] test_printf: all 388 tests passed [11585.831401] test_printf: unloaded. This patchset also includes some code cleanup in mm/slub.c. v5: - remove the bitmap and better name the struct, per Petr=20 v4: - extend %pGp instead of introducing new format, per Matthew v3: - coding improvement, per Joe and Andy - the possible impact on debugfs and the fix of it, per Joe and Matthew - introduce new format instead of changing pGp, per Andy 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 | 60 +++++++++++++++++---- lib/vsprintf.c | 66 +++++++++++++++++++++-- mm/slub.c | 13 ++--- 4 files changed, 119 insertions(+), 22 deletions(-) --=20 2.18.2