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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 E6AA8C433DB for ; Mon, 1 Feb 2021 16:18:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 718D564EA4 for ; Mon, 1 Feb 2021 16:18:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 718D564EA4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A58156B007E; Mon, 1 Feb 2021 11:18:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A0A8C6B0080; Mon, 1 Feb 2021 11:18:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 921546B0082; Mon, 1 Feb 2021 11:18:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id 7B8B16B007E for ; Mon, 1 Feb 2021 11:18:51 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 287F01EE6 for ; Mon, 1 Feb 2021 16:18:51 +0000 (UTC) X-FDA: 77770207662.18.crib34_0d11f41275c3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 4EED61004013B for ; Mon, 1 Feb 2021 16:16:56 +0000 (UTC) X-HE-Tag: crib34_0d11f41275c3 X-Filterd-Recvd-Size: 4295 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Mon, 1 Feb 2021 16:16:55 +0000 (UTC) IronPort-SDR: UXtN64vmvcurOXd3IUzsVu2qXeg+dqRIL8SXlhyBqTuCl0R6KcJlHOYPp2o7BnMeJT7VhFLx20 wWD6Q7L3ZQbg== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="179933308" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="179933308" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 08:16:52 -0800 IronPort-SDR: 5OS2hvGD0EL98Cah3aGcdogh6ZTv9w4OG1i4fDRsCEPoQPk45SQePQi8lGL/DCPID9RiZwTvLV WzeK5bwYQnQA== X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="479141559" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 08:16:46 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l6bsY-001AhJ-AH; Mon, 01 Feb 2021 18:16:42 +0200 Date: Mon, 1 Feb 2021 18:16:42 +0200 From: Andy Shevchenko To: Yafang Shao 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 Subject: Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp Message-ID: References: <20210201115610.87808-1-laoar.shao@gmail.com> <20210201115610.87808-4-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 Mon, Feb 01, 2021 at 09:49:59PM +0800, Yafang Shao wrote: > On Mon, Feb 1, 2021 at 9:27 PM Andy Shevchenko > wrote: > > On Mon, Feb 01, 2021 at 07:56:10PM +0800, Yafang Shao wrote: ... > > > - 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) > > > > > > The Documentation and test cases are also updated. > > > > Thanks for an update, my comments below. > > > > ... > > > > > - %pGp referenced|uptodate|lru|active|private > > > + %pGp Node 0,Zone 2,referenced|uptodate|lru|active|private > > > > Since of the nature of printf() buffer, I wonder if these should be at the end. > > I.o.w. the question is is the added material more important to user to see than > > the existed one? > > > > The existing one should be more important than the added one. > But the order of output will not match with the value for page->flags. > E.g. > flags=0x17ffffc0010200(slab|head,Node 0,Zone 2,Lastcpupid 0x1fffff) > It may be strange to compare the value with the string. More I'm looking at it, more I'm thinking it should have different specifiers for each group of desired flags to be printed. So, you leave %pGp as is and then add another letter to add more details, so user will choose what and in which order they want. For example, let's assume %pGp == %pGpf and P is a new specifier for what you are initially adding here: %pGpfP => referenced|uptodate|lru|active|private,Node 0,Zone 2 %pGpPf => Node 0,Zone 2,referenced|uptodate|lru|active|private and so on. -- With Best Regards, Andy Shevchenko