Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp627804pxb; Tue, 2 Feb 2021 13:40:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGgz57LI3xFyDej5X0PJrOEvG+E7Me0k7jcCXTfwZ3eEWEoyOIbcbk+wsWVxfABj0fcu8M X-Received: by 2002:a17:907:7252:: with SMTP id ds18mr607ejc.239.1612302000864; Tue, 02 Feb 2021 13:40:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612302000; cv=none; d=google.com; s=arc-20160816; b=FN/bnrXKfZaAtUHYlw1UsIPLNmK0TpCI2xMd03BGBlXM2AA4fKQ+amRnPs6oyNVnZr TaNBZEoAwdjz7uCZeu5rqv+aAypdlmWzinYB2TgMr6X4nNb8s3fSinvf6/jz4QNklgkw WtLa7pAdrSkBhcQZTfFTg/SVOwNecOPDiylCeeVxeaLuUy5XDto9yeU3BAE7sufWFx13 WMWvZKqpV+IBqVCYPJ6e23Fa2xw1xw8UDBTI6uix1KwEqGtzkIJunuoXxJg9h/vYcH1O /qAmE90XLkS+Kk1wwfl5+w3bMrJWHyNXNrdzOdclpQfAb+sdV3DRo3bRZ/zfjTduCLAB mNYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jVgE0oIK3fGiGsKx3cUd5LP7xU0dIQnIublrKDLp/XU=; b=wq3+DOcUWHGodo87IoD/ehKIfHykcWXtU6xA4/zpAEEuzzFCUDB1FBcYe7vR40f6Ro HAoqzavbKoUPOvo3TtVNiNWyKxNdkuX9ekltT9FoP7CuB2vta5U6Ida1qsk4YyKZlvdm BQ+m2ef4KFLnc+gk3vaCCMfppZt8hiMU2CEMQ/LO0XkIs3A7Oxgu92SuAWPfA87Fx8Vx I+OlzBklRhx4dfpaIWIW2q8eEs2mkeyV/LhZMrqUADUSDFyu1ysd8pWbFP7hHJKNirJ0 q1WZn5xagpyX9GXJy4DXzsYMCXsgc4mmXauwr0P0F05IPIYILHash6K+qhdJlpsB155Y gugQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FwXTZ6em; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si58792ejx.149.2021.02.02.13.39.30; Tue, 02 Feb 2021 13:40:00 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FwXTZ6em; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbhBBN1B (ORCPT + 99 others); Tue, 2 Feb 2021 08:27:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231842AbhBBN06 (ORCPT ); Tue, 2 Feb 2021 08:26:58 -0500 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FC45C06174A for ; Tue, 2 Feb 2021 05:26:17 -0800 (PST) Received: by mail-il1-x12b.google.com with SMTP id y5so19001998ilg.4 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=rhF4iu3rc3A9+UupMSgbFBgAjykDa4BOqwX8Z9EKkKg0HleGzD42cxI6qZyfjDls2y JProl0n2wmHMAaKs9abEBV7nrSQHxw85T5D9qStDiODHy7QR+Id3uBruCig9reUEGNUJ 98LA3uLJwwsZp7nZaBPAgjNRaSuALHKQzxwbKwB2MYrpk952xr/LsYr7tYdwJWUv8aNQ hbk7shpcteUKYeIBakGf6I2VhmWz5CBvuYgzdonarhPfz1hO3xV0LcjYBP2FSAs0teJk IG0zEkZ2GyWlfBF6rHYdXJgIv5l5jg86CO9SNhoA4BRX9xD3LUfIvAcBk7PNKNOJvZmp 6e/g== X-Gm-Message-State: AOAM5305XcrA15fW5Mzgb3Udu/S8EsUSfa29vLZ1hpKdrqrvwLYviu2v t0zymzJgQgpcXn4vHf9p8+K57GmqeESM4bgjscQ= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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