Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3828360pxb; Mon, 1 Feb 2021 05:55:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPD70IkTotW8il2LVRRNL9u30zXB7f0fXXGKRWxCIzseeJ1Kn1f8y1rB3Zs/OBi7B2rgj7 X-Received: by 2002:a17:907:9879:: with SMTP id ko25mr17964354ejc.524.1612187750383; Mon, 01 Feb 2021 05:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612187750; cv=none; d=google.com; s=arc-20160816; b=CXpPQv0jyMK6XMhU6hoHktJQ5uT+lPJWm4GnvdcLHJBlBgP4C7n7U+r3ODIj24imEV jQ2gb6F9h1/IZzkup+S675+lRHjlLyTECbA8Yq3p4bxh4yX6I/EnZVVWeVQcwVp5jRWd 3r72q8ZtC4qSXIN8a0W1dcOZNmsPIdcXWpfiYUtNqGDY1vxCTEvhrWWcQWNN0/nVN8BP KOXLtXIYg6le2ukbiSXACYc6X+7n2eaiHv/Uzd169F/jgwgVvqMQlwVkA5nHu5dzlj9N caT1owUPRsvHs2kz2VyqkLH9YkAjuYacB7myC6BM6flvc0FMZNrhj0UsLOeVczuVQorZ bjTA== 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=BeSu4xYQl+/zC1Ai3KoLiW3Kk/6+Mg+BlRaAWIf/mIo=; b=b6Dv54WxxoHi8MI0/c3WokQtTJevII5DrFevSYhN7Zby0gpSDjvbtAb66D35iGntoE m506DUBJ3GqWOGbcgb9CyCjrX130YkEBp/4bJ1MQLe6Rz882Ms5y+qZb6IHO834kFfTV 1FPChlzwB1/PJHriE+iyeZcetni2pNAVnDEJAiLvRPSz9Wrzk9NxFgZu8u2DRBShk67A VM8hMUktkbRyoTz8/ZVrN5Vjtrzr+NYQul6pK1qt4MKabybjGCxIr/aSxRxMlFa9wthS K1DuGjcPJ7j3zJQescM8Rwb8+lQN+rMFSXwQd9ztfcB9id6kBAGFI/xNv8tznjixgBjn e56w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TKw0vFNs; 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 s12si10310017ejz.50.2021.02.01.05.55.25; Mon, 01 Feb 2021 05:55:50 -0800 (PST) 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=TKw0vFNs; 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 S232040AbhBANyL (ORCPT + 99 others); Mon, 1 Feb 2021 08:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231657AbhBANyK (ORCPT ); Mon, 1 Feb 2021 08:54:10 -0500 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F281C06174A for ; Mon, 1 Feb 2021 05:53:30 -0800 (PST) Received: by mail-il1-x133.google.com with SMTP id p15so14879368ilq.8 for ; Mon, 01 Feb 2021 05:53:30 -0800 (PST) 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=BeSu4xYQl+/zC1Ai3KoLiW3Kk/6+Mg+BlRaAWIf/mIo=; b=TKw0vFNs9522C1dd7Jccv26cVLax4gf7b5Pdi9MpFL5+U7BJd20VZZ4haBWYlmAk5R 6cPy4h+s0Bcj8kfLANlSYZEm92KeKHt6aV0W7TcpPXjVc4lya9EYECMQiamUMJOe011w 26IPjwmr+AwnbhvgJOysJCzrjIPYpvmiQfcj/mrEbIzd6kofGn9uImj58ERdKQW1ZnSc oi+voxs82uSkbAnq+yyUWAPUD4TdP5oS2IZVcP7WVgeBysn2Ouq8rhXyWEjMAC0jvVbh JNkQO+v9rdoOcV6IIumpPk060NsCkuYoUMPCukUzi5wohtCJdBxp0KaDzr1HQV1unwQA bMGQ== 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=BeSu4xYQl+/zC1Ai3KoLiW3Kk/6+Mg+BlRaAWIf/mIo=; b=BcGe5A32OnLOln1IZEr9I3OW+VsQ4MbUMiOAVKkAjNMrjiofhR7kmTfIygvq/xCggS Hk/vgfIo/lKA0ctd6M7R/rPzv/04RHd/Z1hQrxfOZ+4bn8sDZCWARuCUXGLUrGHoUP/i 6JpmPcmXnfGdNY4lZnmfJoPoWZZKG54fExwxEgf6M/2zAeuQDZulExiblgDPYlnRnRuZ 2vgiDBG9dv5kz7Ywnjnx5JHk5dyibJXMI3nTVXUg9kUe99+e1rzOqX3Z4GaD6dFEYpZ0 PZ8ynMPwhgaovBzitoDi9W4zBOiYQ4GmNYlqW3J+4LISEUck0ofJNdXGdcO8C5K1kIdg NnUQ== X-Gm-Message-State: AOAM531m9CTrOs1UNFI+s5yeJYHVGYxqgDMjl2HFG2ioIEXQq0fY+vGK cMdR60s6iuNex6kGTEj6HFwWEQAS89hg50zE5BM= X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr12729742ilr.168.1612187609633; Mon, 01 Feb 2021 05:53:29 -0800 (PST) MIME-Version: 1.0 References: <20210201115610.87808-1-laoar.shao@gmail.com> <20210201115610.87808-4-laoar.shao@gmail.com> <66784ea1-29c7-6bed-ca7f-cd3e7ea9155b@redhat.com> In-Reply-To: From: Yafang Shao Date: Mon, 1 Feb 2021 21:52:53 +0800 Message-ID: Subject: Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp To: Andy Shevchenko Cc: David Hildenbrand , Vlastimil Babka , Miaohe Lin , Christoph Lameter , penberg@kernel.org, David Rientjes , iamjoonsoo.kim@lge.com, Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Linux MM , LKML , Joe Perches Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 1, 2021 at 9:34 PM Andy Shevchenko wrote: > > On Mon, Feb 01, 2021 at 02:23:33PM +0100, David Hildenbrand wrote: > > On 01.02.21 12:56, Yafang Shao wrote: > > > 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. > > > > > > - Before the patch, > > > [ 6343.396602] Slab 0x000000004382e02b objects=33 used=3 fp=0x000000009ae06ffc flags=0x17ffffc0010200(slab|head) > > > > > > - After the patch, > > > [ 6871.296131] Slab 0x00000000c0e19a37 objects=33 used=3 fp=0x00000000c4902159 flags=0x17ffffc0010200(Node 0,Zone 2,Lastcpupid 0x1fffff,slab|head) > > > > For debugging purposes, it might be helpful to have the actual zone name > > (and to know if the value is sane). You could obtain it (without other > > modifications) via > > > > const char zname = "Invalid"; > > > > if (zone < MAX_NR_ZONES) > > zname = first_online_pgdat()->node_zones[zone].name; > > > > > > Similarly, it might also be helpful to indicate if a node is > > online/offline/invalid/. > > > > const char nstate = "Invalid"; > > > > if (node_online(nid)) > > nstate = "Online"; > > else if (node_possible(nid)) > > nstate = "Offline"; > > > > > > Printing that in addition to the raw value could be helpful. Just some > > thoughts. > > printf() buffer is not a black hole, esp. when you get it messed with critical > messages (Oops). I suggest to reduce a burden as much as possible. If you wish > to get this, make it caller-configurable, i.e. adding another letter to the > specifier. > I think David's suggestion will help us to identify issues. You mean that we should use another one like "%pGpd" - means pGp debug - to implement it ? -- Thanks Yafang