Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1265569pxf; Fri, 19 Mar 2021 03:18:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDOhMLc8kDEZNHGG38hk6B1/Luobvnjh74TPJIn/p/CzvXKhvDiHMtzk3kl34Y8daIGPTW X-Received: by 2002:a17:906:82c5:: with SMTP id a5mr3526411ejy.232.1616149080945; Fri, 19 Mar 2021 03:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616149080; cv=none; d=google.com; s=arc-20160816; b=cjwmlVvnbX0HzXFdhwSc1FucNHJQqGt6kNWOvrKa7vCY0bRpWgbM9UB1jpNkfsGu5B 8pRC53m/anmnUL3l4uK+L5LhEebMuuemVaLcAheR2scNYllu1qlF1ZZ1ugTuDeZt07/Q cwk81NBN99xnEAce6rkJYv7G23EIWAhMpuK0m0DRmVMOeNm07w5AP4pSRz9avjtzBfU1 k7+4++uHab/rHhbwySmLV2gmSWoCBx30BcnI74tnLyKlDr6slhXX2+GA3JTvMMhW2koU IQ/zjzExySUUw3+zaPBunEXZn41dquaWsBPjXqKjO8nMPGRmKx5fLwnBwilSAuxZFIMW 6rEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GtahXJp+uaR41csgfyvASKpwx1k07B8T9fka/mVTFKI=; b=Z5CiDnRQTMlADk8V4x/oRqFqOYLs3ngQxeKvN2wcobLou0Shl1c3ok5oM3hdi9GTqd cM5C+3MP/gEkK3oXYZ/1Mr0LwiAzoqxeSpKKEAu9QRVM2CFtvUiWOfUQKaGicwZGVDjO YdQbxiPnKy8b0my2yw4d6C/xNdB5XSQ7oHQfCLHV9SjW8bLT85KcVKgfPdKic4hz/MTF GUBV1lDW1ZKhA75mU4Yrqyrllkxuh6pCzSfGIYtJYgQEbCVkMYVb/kWH62pv5Lzq9kKA PRL3od36n9IRsE76s20P7B91IXPrCgaZ2BA9yz2MS8jLQGdvwjlReCr0GWo2oo0Nu9gj HPLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MJUbI9ZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h20si3772077ejy.416.2021.03.19.03.17.38; Fri, 19 Mar 2021 03:18:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MJUbI9ZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbhCSKQZ (ORCPT + 99 others); Fri, 19 Mar 2021 06:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbhCSKP4 (ORCPT ); Fri, 19 Mar 2021 06:15:56 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C137CC06174A for ; Fri, 19 Mar 2021 03:15:55 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id r193so5466294ior.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=oeMfQt6Z6eeGS2BpvCkGP8A3gITROEwq7QVi9N85EGZjWJuuUgRWKd5f72Fd0d+s2P tdOj0bg/3F057KyvI8IcdiL1PkuGueyjkDHGFanmTG7zV79+k0tGIIadwqj1IfIzLeOD qx34lLkANOTXiBHEvFxFZQtOlKHdSQHDtdI6ItNeCv9tHRTV0XzGwEx9RXKn7duzPyDZ g/0N7+9VwS/wlL+r/FgknZ6ZC4rijliivUKj0MaIQSRtUqG6BNOf8ww3LPIXb/zCfNwu 6T0qfdC/memlIKE6Scd2cvnI7Oiouo5/XlgtznPVhk/8aXJZ7sICEnEIssAdN1sXElx6 MKMg== X-Gm-Message-State: AOAM533xzKt5s1o7yjsWxcZI2CW1nVSd1huQYk6KWlQtk9p/Sh9Li+8T /lg8bDfZYs40JnpUDFR8by2w53O/kXwEfcROfio= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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