Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3808958pxb; Mon, 1 Feb 2021 05:26:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHgd/EpN569c2fiYB1tCyVz3WyyjTMXk4m+MEDikcMjhmIWXwQbk6lPOFzOGHr8LC0A75q X-Received: by 2002:a50:a086:: with SMTP id 6mr18480009edo.70.1612185989593; Mon, 01 Feb 2021 05:26:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612185989; cv=none; d=google.com; s=arc-20160816; b=C9FSSYzfylbRRS/c5pxAMZgbfW9OBO4pI2lJeMK6PyCDubjkniqyNrAA+jjiBhq2CR VcUWArWHJ1x0ALx+MBsKlxmADRb7TCg2jFH3TCREzEOTc11c9GO3+2sbIah0LXJAJYBx A9Ihqw7AcPjk+qKiq6CBWxp7vBHVzuHZI6qHFoqbshHfRrc5eiwMD+vGU0w6Em/rvT7W K4QYGAFylsyPt2sv0XgAoyoxUMXJ9amf4ZpioDfN82Hn38C+aECjk9o/SC2OZH1Y1whV FX0OBqCpwOm5kFWTdql3cmak4sbN0f1CRp/vriiRv884kw+v/RvHA7hisn0U3vDtH2Ks JuLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject :organization:from:references:cc:to:dkim-signature; bh=FO28Yto7go7+rO9NIvxhqqef8rH+XR+/w56sMd7KMmQ=; b=fV/CV0w86KhK9c+EXME1M0ExfGTPLUXDUZ2VH8gtVJswU07nPOI1IPBgZggafGxmul D+5lHvq2tJHnhKrBwFSn2bXUJJ+BL5KSb9pD12NoiZM7CZvnLgI5Dsd7dqx9Rl11Rq8y xcrx9mVFjmZOT7Q+SmLpTpRKtAa4JILOr99QVMQiWUAFHvaBpMNZri0QcnnRllsQb9+W Ivl2yHJFbBi78Ug6+G6M8NsxSYfMRSsHEgI3HX/Ercx62Mq6lwZT3oTbRYxbjW3v/gvC IXZXI8HwD9DkYkbNON2x3wg01EWOCgFkB/fcumlcYJcrQM8U2L6qL6WmxzwNIBGtCRHD +rbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ELJezfFS; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si11257561edw.310.2021.02.01.05.26.05; Mon, 01 Feb 2021 05:26:29 -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=@redhat.com header.s=mimecast20190719 header.b=ELJezfFS; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231737AbhBANZN (ORCPT + 99 others); Mon, 1 Feb 2021 08:25:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55075 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbhBANZM (ORCPT ); Mon, 1 Feb 2021 08:25:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612185825; 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=ELJezfFSV0+n+nX84l+UxOQcq/ekHJdZQIpZLqia0rJ48Z/gC+wNDzdRaVSGinfMAV4LF1 2GtEjkU22bfkzF7RBeZzUGyPu5FERTVd4gFBiXOcw6AGUAN53hOc8At88dU0y9Qf78QPlM 3asyr5/UeD7io2IQB12c4k60ZFATvn4= 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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Thanks, David / dhildenb