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 502ECC433DB for ; Fri, 19 Mar 2021 10:13:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B8F7464E20 for ; Fri, 19 Mar 2021 10:13:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8F7464E20 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 3E7CE6B0071; Fri, 19 Mar 2021 06:13:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 397876B0072; Fri, 19 Mar 2021 06:13:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EAB26B0073; Fri, 19 Mar 2021 06:13:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id 01D246B0071 for ; Fri, 19 Mar 2021 06:13:15 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AEC881800E8E4 for ; Fri, 19 Mar 2021 10:13:15 +0000 (UTC) X-FDA: 77936211150.15.C07895E Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by imf23.hostedemail.com (Postfix) with ESMTP id 46437A0009DE for ; Fri, 19 Mar 2021 10:13:15 +0000 (UTC) Received: by mail-il1-f174.google.com with SMTP id r8so7504282ilo.8 for ; Fri, 19 Mar 2021 03:13:15 -0700 (PDT) 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=swgTZcyDxG5UXaW4eHWPXDYwsdLtPHRopFJD8lRPN3g=; b=BHZgQsWpnBiS9SCjS+RnsgqjhdNZMxFkXvHJDRTzTP2VLZHicmCOzIB+GL+gXJf1QR dEp02FmhbrFuIyefgYxhBOeBog+kqks67UEW9csOT+AxC891/ncEKektHoYVgOMotWLy cwAolNe5nWLHCegNhL5av07pfwakXqvHGWaUCtrLd2l57+aJVgb0CEe33H/5xd8MejKA BT3OSQvhpatu2V8iDJHYcCyMcCsOvWwSfkd3yxBlG3XmCow9TJ089aH2HzoKTnPtufPC o+wdPOWzhwYcuQZSPhyER0SGSu1EST8zCr5oL8W2l4t1hganJh1/Qy0yZKaHPJLPwiwp 1RKw== 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=swgTZcyDxG5UXaW4eHWPXDYwsdLtPHRopFJD8lRPN3g=; b=dPM5/x3n5IUmuCg6mLl4UetKMUbboCmoLhpUytahXBDh+t99USa84iA4Baho6kX0rO AXJiXPqtYTurqc0Jki1SXfT0Uc5dZtouRIdQOb4WO1ker//CU9uw8Ks+iOOmZ0tzK6zr wgsiA70Wdf+X0gqfFenfNvRhei6ZuxyhLnJLdYvX6kurA7+V1B9Uo7tSLpxFllMfj3N2 c7TWp7r1I+Fom464u/GJR1zjwiLRIj3IHUiFS7cx0Gq8zuJP/qL+DCV7h9XB3E7b4iCn K5myNP5F1TJbXyDPut7ITD7HzXSgDci/49KeDWeURr2Lo7IKBYvj9TMRgw+Eiy5hPk2X 7Usw== X-Gm-Message-State: AOAM533fY5WIfPoxWK747Gf16ax5pPaIP/Ac4fFCUV0Cm28oTUud/lsV 27OQQ2Y8ylQnf3c9kBsMMgs= X-Google-Smtp-Source: ABdhPJz98OKxqCE3R/n5bwWuYlzTJScdl9KQUiNSCb+FTLjL0Ka8VXGgLZqW85jUI10CuMTRcwvi/w== X-Received: by 2002:a92:4b0b:: with SMTP id m11mr2135500ilg.156.1616148794629; Fri, 19 Mar 2021 03:13:14 -0700 (PDT) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id v19sm2372827ilj.60.2021.03.19.03.13.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Mar 2021 03:13:13 -0700 (PDT) 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, lkp@intel.com, Yafang Shao Subject: [PATCH v6 resend 0/3] mm, vsprintf: dump full information of page flags in pGp Date: Fri, 19 Mar 2021 18:12:43 +0800 Message-Id: <20210319101246.73513-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Stat-Signature: ikbrsirz1bfk1xz6gq663xhgqx17b67w X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 46437A0009DE Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf23; identity=mailfrom; envelope-from=""; helo=mail-il1-f174.google.com; client-ip=209.85.166.174 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616148795-50844 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 test cases as follows, [68599.816764] test_printf: loaded. [68599.819068] test_printf: all 388 tests passed [68599.830367] test_printf: unloaded. This patchset also includes some code cleanup in mm/slub.c. v6: - fixes the build failure and test failure reported by kernel test robot v5: - remove the bitmap and better name the struct, per Petr 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 | 90 ++++++++++++++++++++--- lib/vsprintf.c | 66 +++++++++++++++-- mm/slub.c | 13 ++-- 4 files changed, 149 insertions(+), 22 deletions(-) --=20 2.18.2