Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3938558pxb; Mon, 1 Feb 2021 08:23:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBA8admx7jw3CPU9ZZc5EX8EW29kJIcqXZPunR/C/JC18w2oXN15H/UPEsJxUn/+21nU0x X-Received: by 2002:a17:906:c08a:: with SMTP id f10mr12066573ejz.52.1612196619259; Mon, 01 Feb 2021 08:23:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612196619; cv=none; d=google.com; s=arc-20160816; b=NE0YZuyaZ6k4JmJh6w5wRhghxizGHnyR339MS5fyTOAO2MyOQHwV0CHAHwXL3V1M0g V6KREY7Q19oAo6lCEPsGAdt1Ad4xVgfZ96F9zU16u2eE9iKJRgp6ZxrZQQQp6l/LOMHT R1u788AwD4lzAVD44UpqRD/0S4LLl+KAuJKUQbCPcwWnpv+GlFuynm13p5cAwMnktDjS INndclNr7nBnn9w1hirWzFKNZgxauXL5huDlN8QASg6AP3qjbeRrdVFK+FqnQhopxe8V qF/j9ToihEe4Sly2zeU1RbzJtF9wR/xuVi6+akRuAexiglR80oetDcIFj7ODWG0ZtZ7U P7aQ== 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=p3QRMAdQEUUor0C6pNDLPeZQr4XlnM+RxuX4RaSPyDY=; b=zO+ACfdQpmKcqaR4WkzK4shwCZZNxSHdx3c71MH/K8ft3plNDHeDFU3iHqNGk93NKL 1+CwCPuF2iU62d26DZ42W8IyTHpxMNxck8OPzXhq+O7q577M6ttZHpzxvGemWsshrMtE GAUF/pjPXfV5OV8rWJsZuO7Na+2dBBPD5alYQrubKF7TG/JO4RZ44Ti2S7puQZn8mzMY zD17w/E4ewwz5Ud4Vr3dN/P2yaiMPC76ZztJeksGIT+8Y0SspYphzgu9IMqDx1gwBLmJ 2E/zIE8P4rgE3dV6VnJGeViQzJQz1mSJqV5BTH4g+RqLLCENKQOBurMAk0sJ72wEANm6 lZSg== 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 m3si889059edq.484.2021.02.01.08.23.10; Mon, 01 Feb 2021 08:23:39 -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 S229543AbhBAQWO (ORCPT + 99 others); Mon, 1 Feb 2021 11:22:14 -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