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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 1FDC6C433DB for ; Mon, 1 Feb 2021 13:23:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8597C64E98 for ; Mon, 1 Feb 2021 13:23:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8597C64E98 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C99916B006E; Mon, 1 Feb 2021 08:23:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C52776B0072; Mon, 1 Feb 2021 08:23:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B11516B0075; Mon, 1 Feb 2021 08:23:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id 98C176B006E for ; Mon, 1 Feb 2021 08:23:45 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5493F180AD830 for ; Mon, 1 Feb 2021 13:23:45 +0000 (UTC) X-FDA: 77769766410.27.jar00_4c073a5275c2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 3DFBB3D670 for ; Mon, 1 Feb 2021 13:23:45 +0000 (UTC) X-HE-Tag: jar00_4c073a5275c2 X-Filterd-Recvd-Size: 3907 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Mon, 1 Feb 2021 13:23:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612185824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FO28Yto7go7+rO9NIvxhqqef8rH+XR+/w56sMd7KMmQ=; b=UImasVk86D4qJepyJYXrNAzhAGTqkQcKwHaYvMIE086u6OyNSTPKKQtznDZ1qcXgidpaMx lnVXZxQCoNcXn9lffyEj2b/L5yHL87ZMzXiymnZX8hDwsSNGVNWhaLo8FzYQkoFz86ZV5b aG5Ca/zYl1VdwYvPOumMg0cg1Sysk0o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-i1ELzcegNYKVRo7oijAh3w-1; Mon, 01 Feb 2021 08:23:42 -0500 X-MC-Unique: i1ELzcegNYKVRo7oijAh3w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0BD99CC01; Mon, 1 Feb 2021 13:23:38 +0000 (UTC) Received: from [10.36.115.24] (ovpn-115-24.ams2.redhat.com [10.36.115.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6221E10016DB; Mon, 1 Feb 2021 13:23:34 +0000 (UTC) To: Yafang Shao , andriy.shevchenko@linux.intel.com, vbabka@suse.cz, linmiaohe@huawei.com, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, linux@rasmusvillemoes.dk Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joe Perches References: <20210201115610.87808-1-laoar.shao@gmail.com> <20210201115610.87808-4-laoar.shao@gmail.com> From: David Hildenbrand Organization: Red Hat GmbH Subject: Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp Message-ID: <66784ea1-29c7-6bed-ca7f-cd3e7ea9155b@redhat.com> Date: Mon, 1 Feb 2021 14:23:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210201115610.87808-4-laoar.shao@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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: 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. >=20 > - Before the patch, > [ 6343.396602] Slab 0x000000004382e02b objects=3D33 used=3D3 fp=3D0x000= 000009ae06ffc flags=3D0x17ffffc0010200(slab|head) >=20 > - After the patch, > [ 6871.296131] Slab 0x00000000c0e19a37 objects=3D33 used=3D3 fp=3D0x000= 00000c4902159 flags=3D0x17ffffc0010200(Node 0,Zone 2,Lastcpupid 0x1fffff,= slab|head) For debugging purposes, it might be helpful to have the actual zone name=20 (and to know if the value is sane). You could obtain it (without other=20 modifications) via const char zname =3D "Invalid"; if (zone < MAX_NR_ZONES) zname =3D first_online_pgdat()->node_zones[zone].name; Similarly, it might also be helpful to indicate if a node is=20 online/offline/invalid/. const char nstate =3D "Invalid"; if (node_online(nid)) nstate =3D "Online"; else if (node_possible(nid)) nstate =3D "Offline"; Printing that in addition to the raw value could be helpful. Just some=20 thoughts. --=20 Thanks, David / dhildenb