Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3937374pxb; Mon, 1 Feb 2021 08:21:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXK7lRqD7kifQbUu9VnMqIC14/7L/KgbYhlDD9B/13dhZVJ7uZQSIHuSvKvRBEf06iL7XL X-Received: by 2002:a17:907:210e:: with SMTP id qn14mr1824183ejb.237.1612196513914; Mon, 01 Feb 2021 08:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612196513; cv=none; d=google.com; s=arc-20160816; b=TcxWJkclb0N3KudyqQQPQSDsEsyWbD5oHAWl7Vs3H1jnvM6HeNEXlUYJU0wZMmOT6s WrDxbpH7whSyWDtw1UWbhJOfX9efELV/sfjIesZ8Uhjp13q/5PwRdnu8NVFTPcO51mgH GIe5fJ3wqHbTlVD+S4UFjutb7xvsqaUZUIRc/tR7+u5AQN24q47AUllvrn3NYOSoC0Rv prCDFsG8VBxrGfiQlipGf+g5V7rl92GDOwz02eJWRCh5fDfsIc9dZxewFrcb5RQRSspJ konYqBYU22vOMN3ph23d+OfqEDJ6jBqKaCZPlWVUhLjPK92mlLLBHyigQE50hMVZv83O rB3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=+/dM6flvgFoaeMIfM0ukVTa0YlhJgvfLC7nAfHafwYE=; b=GJYDQeFrGkZP/PzJnqMAEXeAFg/gopoeTd5twjUkUhU++nLRoHhABl9xiNMpdyM8Eo 8M460UETzmvNX/g0uwpOVInQhcYDLM9lbUheCbgs1x3l9mtw+KYFWki/+HWZqQPfidnH uuXoYFA+qF8vUVAHbIuVqizQAV33wGICldBtpA6d/Ags6Jl1Z8c5pBL1aKJG5M8Nq6g+ 670zrvUzAdw8db7f1Vec3DAYFJlSZ5qkQRvMGcKUkDvQ5PZNDDKpw1zSNFOYsLg6lA2c j11GrjA2gYKPXh4B2HXtKZRuYO9MwJ7yJwP/puNunvZ733PPjr0Gra/YnYuczg/52a7u Cy3A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si11801375ejs.180.2021.02.01.08.21.29; Mon, 01 Feb 2021 08:21:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbhBAQSo (ORCPT + 99 others); Mon, 1 Feb 2021 11:18:44 -0500 Received: from mga17.intel.com ([192.55.52.151]:32955 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbhBAQSk (ORCPT ); Mon, 1 Feb 2021 11:18:40 -0500 IronPort-SDR: SE9hoT4m542b9hxBWr8sIuPLmGLpbUmDz7BCG9n0CQPjeqUusTGdqJf5ilSXjxdLHQUn4rzAbC 5dYCp+fa9tdQ== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="160475422" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="160475422" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 08:16:53 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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