Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp454810pxb; Tue, 9 Feb 2021 04:50:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLmm1fdyjM83eDWPIREnhEd0cbkb+rrdlOmQKq9ZBsp3axeDHaiY9dRYvswpW5kr7fChBq X-Received: by 2002:a05:6402:b26:: with SMTP id bo6mr21942150edb.46.1612875046991; Tue, 09 Feb 2021 04:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612875046; cv=none; d=google.com; s=arc-20160816; b=yyKWTc16YBnsqnMyGxJEdnyxH0XAa9oGcsZIrAcyVbn0tf8OVL2aSVLZglA1gDnM9M lDrcnRdxWMK3Z9Z+PAUznPO2B5ZTgPBcM6x3L4RoJkevUArkmWyot3iVOUeBWF4XeYoQ 4dLRmCQ6hqFibbB5nUp5aIuHM4xBBCjD1LzCfr3n6egJeXQoaEOp1S6ju/JMAJON9LEG jTJzqKhWNAx3HpI3wjleya9CwRBC3LTaAbep2A8oLCf0UFz53/MYP1msy2gKmGL50jDJ dILTIUxfYTzqIO/kgbfuvfVoxr1/Va3ZaVqNQ9OsER4aEYWVfUW+XEG4DEndSDf6n8VN yk+g== 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=LyiuBQmfrEcnz80v7jIiARrEWWbw8ydqO74QRrr7oa8=; b=DUw1KNXJssvR2tgHYNbmDCAnBsJx0lnPKHLqxaXZZwMhUU3vS69v7Lq75dHViRw0HN mUK17YkJ1ogu1DSIbnA9jrzfjXogxN+cEG0CjIrVqqhvtHIkpnIu3DNEgd62dm1mbzHW eMvXyXIiHtGGFdAPdAw0xoP21WNqXeruW7hYCXSP8yO/SHCSQvjIljuxOFOqkEl6aPnv mequ7P+0B5EGghUtMp7aDtEQ953gIJ3vSDIn0G3QYOqUr0hApsG3tggx3HBIZR2IzQub EPnObho2pKZR+gKa+jbClFz4xSdDcOoKEJLJ5gc6QShSCM3JX4U6MyFgiO7NsvYFxbm4 oMNw== 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 g5si15292520edj.194.2021.02.09.04.50.23; Tue, 09 Feb 2021 04:50:46 -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 S230235AbhBIMpn (ORCPT + 99 others); Tue, 9 Feb 2021 07:45:43 -0500 Received: from mga11.intel.com ([192.55.52.93]:15596 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbhBIMnB (ORCPT ); Tue, 9 Feb 2021 07:43:01 -0500 IronPort-SDR: wyMpPCyYtzIAvkBtLuKC1RRGYHs6TwB3gIoozCI8TPxITky6Kk7x9WlNeYz8bfjGqAWMXdAWKS 0zepbT7RYdmg== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="178362269" X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="178362269" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 04:41:08 -0800 IronPort-SDR: 6KPKfSvEZSTkUrzHjcp/yuliol8zzke1i7JlRE/MWmabiN1Rfs7TsNnoJ4kMBS/hCoUtpjfX8N Kp/n0M/KEWgQ== X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="398768358" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 04:41:04 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l9SKD-003DWG-9k; Tue, 09 Feb 2021 14:41:01 +0200 Date: Tue, 9 Feb 2021 14:41:01 +0200 From: Andy Shevchenko To: Yafang Shao Cc: 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, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, joe@perches.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/3] mm, vsprintf: dump full information of page flags in pGp Message-ID: References: <20210209105613.42747-1-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209105613.42747-1-laoar.shao@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 09, 2021 at 06:56:10PM +0800, Yafang Shao wrote: > The existed pGp shows the names of page flags only, rather than the full > information including section, node, zone, last cpuipid and kasan tag. > While it is not easy to parse these information manually because there > are so many flavors. We'd better interpret them in printf. > > To be compitable with the existed format of pGp, the new introduced ones > also use '|' as the separator, then the user tools parsing pGp won't > need to make change, suggested by Matthew. The new added information is > tracked onto the end of the existed one, e.g. > [ 8838.835456] Slab 0x000000002828b78a objects=33 used=3 fp=0x00000000d04efc88 flags=0x17ffffc0010200(slab|head|node=0|zone=2|lastcpupid=0x1fffff) > > The documentation and test cases are also updated. The result of the > test cases as follows, > [ 501.485081] test_printf: loaded. > [ 501.485768] test_printf: all 388 tests passed > [ 501.488762] test_printf: unloaded. > > This patchset also includes some code cleanup in mm/slub.c. FWIW, Reviewed-by: Andy Shevchenko > v4: > - extend %pGp instead of introducing new format, per Matthew > > v3: > - coding improvement, per Joe and Andy > - the possible impact on debugfs and the fix of it, per Joe and Matthew > - introduce new format instead of changing pGp, per Andy > > v2: > - various coding improvement, per Joe, Miaohe, Vlastimil and Andy > - remove the prefix completely in patch #2, per Vlastimil > - Update the test cases, per Andy > > Yafang Shao (3): > mm, slub: use pGp to print page flags > mm, slub: don't combine pr_err with INFO > vsprintf: dump full information of page flags in pGp > > Documentation/core-api/printk-formats.rst | 2 +- > lib/test_printf.c | 60 +++++++++++++++++---- > lib/vsprintf.c | 66 +++++++++++++++++++++-- > mm/slub.c | 13 ++--- > 4 files changed, 121 insertions(+), 20 deletions(-) > > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko