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 66D03C433E9 for ; Mon, 1 Feb 2021 16:21:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E885B64DAF for ; Mon, 1 Feb 2021 16:21:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E885B64DAF 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 571FC6B007E; Mon, 1 Feb 2021 11:21:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4F9D86B0080; Mon, 1 Feb 2021 11:21:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C1056B0082; Mon, 1 Feb 2021 11:21:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 2214A6B007E for ; Mon, 1 Feb 2021 11:21:16 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CB52E362C for ; Mon, 1 Feb 2021 16:21:15 +0000 (UTC) X-FDA: 77770213710.18.wall21_430147e275c3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 33C6610041642 for ; Mon, 1 Feb 2021 16:20:27 +0000 (UTC) X-HE-Tag: wall21_430147e275c3 X-Filterd-Recvd-Size: 3691 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Mon, 1 Feb 2021 16:20:26 +0000 (UTC) IronPort-SDR: ko+15r4LqHr2K9z2ba08QxdH6svaYHWPIGYLN37PvYAN9P/9b6enG3cNjQwyWzwOvghGEVRVm2 GRhdXhhSEQOQ== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="199607946" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="199607946" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 08:20:24 -0800 IronPort-SDR: VChN+z2PsLbbaH3QYpdR7+a57+dLBAuownRnMSXs03PWiKTspxmN93maOO9q+J/T+7ajyPOynY 40CnXxD4fhZA== X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="358646170" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 08:20:20 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l6bvz-001AkA-UR; Mon, 01 Feb 2021 18:20:15 +0200 Date: Mon, 1 Feb 2021 18:20:15 +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 06:16:42PM +0200, Andy Shevchenko wrote: > 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: ... > > 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. And I agree with Matthew about format, but it doesn't oppose my suggestion above. -- With Best Regards, Andy Shevchenko