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 0E575C433E0 for ; Mon, 1 Feb 2021 16:22:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D318464DAF for ; Mon, 1 Feb 2021 16:22:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbhBAQWP (ORCPT ); Mon, 1 Feb 2021 11:22:15 -0500 Received: from mga01.intel.com ([192.55.52.88]:41319 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbhBAQWL (ORCPT ); Mon, 1 Feb 2021 11:22:11 -0500 IronPort-SDR: m1lGYe59Xhe5Q0BKaLZ8rq83nN51PXKJxKYL5HOjWs+8+Ozw2lXgt4Df+8+fPNKOqpunCvvQ1w XpA76M7MmP8A== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="199607947" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="199607947" 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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