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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31ACCC77B7F for ; Wed, 17 May 2023 13:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231463AbjEQNoB (ORCPT ); Wed, 17 May 2023 09:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjEQNn7 (ORCPT ); Wed, 17 May 2023 09:43:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2FC459D5 for ; Wed, 17 May 2023 06:43:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 35E7E61077 for ; Wed, 17 May 2023 13:43:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23FDBC433D2; Wed, 17 May 2023 13:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684331036; bh=30NDGJJUQ2ngQiq5TLIVzfaqaVwEFe2VeoyqyahSpjU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gL7FAHfrNE/7yRDcy9u+56Cueii95xAEu6aeJEtdwuWYMhLII9uXwi5FZzPPcT1ur cia6QH1+vq2F5deS56R7lQAGrWI5ZuCUCXXbZpmJVyKJ5bJ7qWDEWp//sVr3x+Wey8 2rC15gjTD44yj80TMpAoHXikCC7QvMwK9i5H2kHbkfIOHVBBdb0TXWQRnmf0PFk1at 1UhgK+KMcXAqna39+1zsxWMKtGoYDgIQM75TfkL5KPt2TCXUFGrsgl2VfHHGDlbLjw DPPYKYyUpG4rWQm0CrxNLtt9hJ4obhz4VW5efoWBLO7zFfchPKrF63h9awhU0L5bW3 LK5E3g3VWNeAQ== Date: Wed, 17 May 2023 16:43:51 +0300 From: Mike Rapoport To: Yuwei Guan Cc: akpm@linux-foundation.org, tsahu@linux.ibm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] memblock: Add flags and nid info in memblock debugfs Message-ID: References: <20230517025747.230-1-ssawgyw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230517025747.230-1-ssawgyw@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 17, 2023 at 10:57:47AM +0800, Yuwei Guan wrote: > Currently, the memblock debugfs can display the count of memblock_type and > the base and end of the reg. However, when the following scenario occurs, > the information in the existing debugfs cannot make it clear why the > address is not consecutive. ... > diff --git a/mm/memblock.c b/mm/memblock.c > index 511d4783dcf1..b36fb6b31e0f 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -2144,12 +2144,16 @@ static int memblock_debug_show(struct seq_file *m, void *private) > int i; > phys_addr_t end; > > + seq_puts(m, "cnt\tbase..end\tflags\tnid\n"); > + > for (i = 0; i < type->cnt; i++) { > reg = &type->regions[i]; > end = reg->base + reg->size - 1; > > - seq_printf(m, "%4d: ", i); > - seq_printf(m, "%pa..%pa\n", ®->base, &end); > + seq_printf(m, "%d:\t", i); > + seq_printf(m, "%pa..%pa\t", ®->base, &end); > + seq_printf(m, "0x%x\t", reg->flags); > + seq_printf(m, "0x%x\n", memblock_get_region_node(reg)); Please use "%4d" for nid. > } > return 0; > } > -- > 2.34.1 > -- Sincerely yours, Mike.