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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 980F1C433E0 for ; Tue, 2 Feb 2021 13:26:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 38B1F64EDA for ; Tue, 2 Feb 2021 13:26:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38B1F64EDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9439C6B006C; Tue, 2 Feb 2021 08:26:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F33B6B0070; Tue, 2 Feb 2021 08:26:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 809436B0071; Tue, 2 Feb 2021 08:26:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id 6A4856B006C for ; Tue, 2 Feb 2021 08:26:18 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 306E48249980 for ; Tue, 2 Feb 2021 13:26:18 +0000 (UTC) X-FDA: 77773401636.11.tiger67_1e09a13275cb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 106C8180F8B80 for ; Tue, 2 Feb 2021 13:26:18 +0000 (UTC) X-HE-Tag: tiger67_1e09a13275cb X-Filterd-Recvd-Size: 5356 Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Feb 2021 13:26:17 +0000 (UTC) Received: by mail-il1-f171.google.com with SMTP id y17so19009711ili.12 for ; Tue, 02 Feb 2021 05:26:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jVgE0oIK3fGiGsKx3cUd5LP7xU0dIQnIublrKDLp/XU=; b=FwXTZ6emWDbVtItD8pjLw2SyPwMYDtXR8ZZ1KCWZoSrgIRTU97iZhu6kc2CVbPhkyd WyEovOI4kY8C0ZdOAkObMHwKTZz5tkhwuOaM5BBUvpQceagIpBj46flPzLXPE7A1nFEb lVaO1SL69qpHltqbL8Pdi4nHSdFRSLSCFKUW1pG4/pjwUf/esFtPAiX5dUUT8B3JNe8B Ecvad9lnEQ7tcPzU5Ra5uqy8hDCzow0eEW+wxIrNMX7cPfVkeTECMR6i8b1mFHRPC7wh Rw73pJWu88JGUajuNuYP1UykCcwEZSf7d10Feb4SUJjcEJFMm9nATRGNG5xboyIDaC1s 354w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jVgE0oIK3fGiGsKx3cUd5LP7xU0dIQnIublrKDLp/XU=; b=ckhs+vRwocl76GTj7rOUt6mVLHXux9vBem5bXlgIxt2mI8g9M/eOmxxxiIuOT9y9Ct 18UCXfwrFir8glVYqdEnzAIED8pQrkqZMLXHy0bg1Cd8Ssa8PtR4zmfJCKSE+ilXQrm0 NIbKsGitH+ZqvOEq0f6mxKCh7TCsZWfu1sHmwSllCsgX3s6sNUlUJewcMZR+letpmICv 6x7kI2DamRbEqfgUJe/oJdlrSH9fE4AOPgKB5DZ1Q0O3TmMy2oWSdVOTRxZTvG1eUwCG 3HtbMB6SfUkjtATqYkpwJZ0CaMb4FDy39VVklP4VoFSLUYzn5CuQrDvevyhxK48vshnG 0J1w== X-Gm-Message-State: AOAM530epfioOh95wxa1GBteodxbTYN1rI8nQ472MnRyQGBrnfMEFDB+ pdqQALZBk7KFgiZaHRjSamdk+DZJQh6MzK0totY= X-Google-Smtp-Source: ABdhPJxC9kN49h4YfGAR9SY0r7v9MOd81AJGZIapGVgfxzk7T4kMTqrwKXkpp3ZKGQ15vU1N0qxSr5zlm9Z0xipHMXs= X-Received: by 2002:a92:d3c7:: with SMTP id c7mr17134271ilh.137.1612272376936; Tue, 02 Feb 2021 05:26:16 -0800 (PST) MIME-Version: 1.0 References: <20210201115610.87808-1-laoar.shao@gmail.com> <20210201115610.87808-4-laoar.shao@gmail.com> In-Reply-To: From: Yafang Shao Date: Tue, 2 Feb 2021 21:25:40 +0800 Message-ID: Subject: Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp To: Andy Shevchenko 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 Content-Type: text/plain; charset="UTF-8" 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 2, 2021 at 12:16 AM 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: > > ... > > > > > - 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. Thanks for your suggestion. I will think about it. -- Thanks Yafang