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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6E743C433E0 for ; Tue, 9 Feb 2021 14:16:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C2BF764E4F for ; Tue, 9 Feb 2021 14:16:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2BF764E4F 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 F3DBB6B0005; Tue, 9 Feb 2021 09:16:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ED1926B006C; Tue, 9 Feb 2021 09:16:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D91B06B0070; Tue, 9 Feb 2021 09:16:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id C008D6B0005 for ; Tue, 9 Feb 2021 09:16:31 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 83419180F76A3 for ; Tue, 9 Feb 2021 14:16:31 +0000 (UTC) X-FDA: 77798929782.12.body96_0f1560d27608 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 91CCE181A9C6A for ; Tue, 9 Feb 2021 14:16:13 +0000 (UTC) X-HE-Tag: body96_0f1560d27608 X-Filterd-Recvd-Size: 3396 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 14:16:12 +0000 (UTC) IronPort-SDR: wA5+XYiBtblBMGzHwfatWMZD7GObu4TxUFIK4g3e4XsyADdgy/N2qRnS11TFjyGbJA2ch893hp Anu1Xsm58kqg== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="181948098" X-IronPort-AV: E=Sophos;i="5.81,165,1610438400"; d="scan'208";a="181948098" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 06:16:09 -0800 IronPort-SDR: RkBMcTU0+fkpsIgm2O+1IjEi6UOCAJd89r6TT0BdfPkb4goL2fqES9jL99M3XdIGoyyLN77Xo+ pIt4LRDN5aWg== X-IronPort-AV: E=Sophos;i="5.81,165,1610438400"; d="scan'208";a="359189832" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 06:16:06 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l9To9-003EZG-Uw; Tue, 09 Feb 2021 16:16:01 +0200 Date: Tue, 9 Feb 2021 16:16:01 +0200 From: Andy Shevchenko To: Petr Mladek Cc: Yafang Shao , willy@infradead.org, david@redhat.com, linmiaohe@huawei.com, vbabka@suse.cz, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, joe@perches.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/3] vsprintf: dump full information of page flags in pGp Message-ID: References: <20210209105613.42747-1-laoar.shao@gmail.com> <20210209105613.42747-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 Tue, Feb 09, 2021 at 02:53:53PM +0100, Petr Mladek wrote: > On Tue 2021-02-09 18:56:13, Yafang Shao wrote: ... > I am sorry for my ignorance. I am not familiar with MM. > But it is pretty hard to understand what call does what. > > I have found the following comment in include/linux/page_flags.h: > > * The page flags field is split into two parts, the main flags area > * which extends from the low bits upwards, and the fields area which > * extends from the high bits downwards. > > Sigh, I know that you already reworked this several times because > people "nitpicked" about the code style. But it seems that it > rather diverged instead of converged. > > What about the following? Isn't is some like v1 or v2? > Note: It is inpired by the names "main area" and "fields area" > mentioned in the above comment from page_flags.h. > I have later realized that "page_flags_layout" actually made > sense as well. Feel free to rename page_flags_fileds > back to page_flags_layout. > > Anyway, this is my proposal: What about to create a one format_flags() function which accepts new data structure and do something like buf = format_flags(main_area); buf = format_flags(fields_area); return buf; ? -- With Best Regards, Andy Shevchenko