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=-7.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 D63BCC433DB for ; Fri, 19 Mar 2021 10:15:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6251564EEE for ; Fri, 19 Mar 2021 10:15:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6251564EEE 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 E45926B0072; Fri, 19 Mar 2021 06:15:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF5156B0073; Fri, 19 Mar 2021 06:15:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6F626B0074; Fri, 19 Mar 2021 06:15:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id A8FD46B0072 for ; Fri, 19 Mar 2021 06:15:57 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6821C1DFC for ; Fri, 19 Mar 2021 10:15:57 +0000 (UTC) X-FDA: 77936217954.40.096BF8B Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by imf27.hostedemail.com (Postfix) with ESMTP id 8D32A80192E6 for ; Fri, 19 Mar 2021 10:15:55 +0000 (UTC) Received: by mail-io1-f47.google.com with SMTP id r193so5466296ior.9 for ; Fri, 19 Mar 2021 03:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GtahXJp+uaR41csgfyvASKpwx1k07B8T9fka/mVTFKI=; b=MJUbI9ZVYA2st4wYNHTZvoSpQVpqGitTSxbV6Ztrg6W3NT8n3zeEjZ4g62iOG6wUQt 2XJ5/NGfbtIAh+HIIco/1RIiKyN/kuG4SThxOKaQX6hQD96IKjdehhwuuDUclsM+ibW4 2EGRPKz2YGjq4f4piYZw4vy4Q6bHowNjIEorwvK2SBLSsClGoXrq3lrDMSUGU6ZyZ9Bj afO7b1FJ930U+BM+t9QRBMMLVTnrMsuo11We0Xn5rLJZwBZG1OjpF3cu9C9wPEJDiXex 8EYHQ118TGpJuLut1Eubnvr0LdGTUAmPRIz8fI8+0PkPHyBSTP0KPHW4gvvFcX0gwtny T1xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GtahXJp+uaR41csgfyvASKpwx1k07B8T9fka/mVTFKI=; b=hNR7RJbIeItlBEQBttvAhLqUWT8+/BNsy6uGG7uZQzTA0SrnsSiczDWfB9m1vLn0UB H+OaLBDy3OV9Nw/SJHwPNlqYp8o26PehaHwpLva4Zw3pMM/6phjh9BQaWPzeFCi12a+I DU8wQ7l0Ra1HNkLhRxpqdzoWSpba1sKGhXdfTADwAtNQbHE6MAF1z737RYtKVmicBuuX Dpwav3bybxUAbjcLO1cSaY9s8Po7R6j97sh4/kPkNqimUWlh0eymq8r8b76KnWBv2Lbc MOdoFrSdRMNtUrj8PpZJF4NnmDbgUYoubxDI7JdkvpuiDM6VWm9Cx/DMGJ3jhpbMbDkl iXbQ== X-Gm-Message-State: AOAM531Tuk3aDJMghGtkHru/mRuYOit3MUYFAUrhTCFIaf61DT58AWU7 UfSzfv038HqHaloE2EN8BTGN6RjfL+0XrFyU3tc= X-Google-Smtp-Source: ABdhPJyG/NhpFiy3gCt+bGl+cqjH1OdXj3G0hOtfGzGM8+BJ/GPedDIXEHu5CvM+KGgcX/NiNbkFpzSp30Uh7eLd9Ko= X-Received: by 2002:a5d:9c50:: with SMTP id 16mr2218315iof.66.1616148955025; Fri, 19 Mar 2021 03:15:55 -0700 (PDT) MIME-Version: 1.0 References: <20210319101246.73513-1-laoar.shao@gmail.com> In-Reply-To: <20210319101246.73513-1-laoar.shao@gmail.com> From: Yafang Shao Date: Fri, 19 Mar 2021 18:15:19 +0800 Message-ID: Subject: Re: [PATCH v6 resend 0/3] mm, vsprintf: dump full information of page flags in pGp To: Petr Mladek , Matthew Wilcox , Andy Shevchenko , David Hildenbrand , Miaohe Lin , Vlastimil Babka , Christoph Lameter , penberg@kernel.org, David Rientjes , iamjoonsoo.kim@lge.com, Andrew Morton , Steven Rostedt , Sergey Senozhatsky , Joe Perches Cc: Linux MM , LKML , kbuild test robot Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 8D32A80192E6 X-Stat-Signature: 8fhof6xydznqhmaeo9q7mpfn5ifbt86h Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=mail-io1-f47.google.com; client-ip=209.85.166.47 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616148955-294393 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: On Fri, Mar 19, 2021 at 6:13 PM Yafang Shao wrote: > > 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=33 used=3 fp=0x00000000d04efc88 flags=0x17ffffc0010200(slab|head|node=0|zone=2|lastcpupid=0x1fffff) > > 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(-) > > -- > 2.18.2 > Hi Petr, Any comments on this version ? Thanks Yafang