From: Mike Rapoport <rppt@kernel.org>
To: Yuwei Guan <ssawgyw@gmail.com>
Cc: akpm@linux-foundation.org, wangkefeng.wang@huawei.com,
anshuman.khandual@arm.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memblock: Update nid info in memblock debugfs
Date: Thu, 1 Jun 2023 08:21:16 +0300 [thread overview]
Message-ID: <20230601052116.GC395338@kernel.org> (raw)
In-Reply-To: <20230529062002.157-1-ssawgyw@gmail.com>
On Mon, May 29, 2023 at 02:20:02PM +0800, Yuwei Guan wrote:
> The node id for memblock reserved regions will be wrong,
> so let's show 'x' for reg->nid == MAX_NUMNODES in debugfs to keep it align.
>
> Suggested-by: Mike Rapoport (IBM) <rppt@kernel.org>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> Signed-off-by: Yuwei Guan <ssawgyw@gmail.com>
I believe this could use Co-developed-by tags.
Please take a look at Documentation/process/submitting-patches.rst
> ---
> mm/memblock.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memblock.c b/mm/memblock.c
> index c5c80d9bcea3..3d449aaba052 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -2169,17 +2169,21 @@ static int memblock_debug_show(struct seq_file *m, void *private)
> {
> struct memblock_type *type = m->private;
> struct memblock_region *reg;
> - int i, j;
> + int i, j, nid;
> unsigned int count = ARRAY_SIZE(flagname);
> phys_addr_t end;
>
> for (i = 0; i < type->cnt; i++) {
> reg = &type->regions[i];
> end = reg->base + reg->size - 1;
> + nid = memblock_get_region_node(reg);
>
> seq_printf(m, "%4d: ", i);
> seq_printf(m, "%pa..%pa ", ®->base, &end);
> - seq_printf(m, "%4d ", memblock_get_region_node(reg));
> + if (nid != MAX_NUMNODES)
> + seq_printf(m, "%4d ", nid);
> + else
> + seq_printf(m, "%4c ", 'x');
> if (reg->flags) {
> for (j = 0; j < count; j++) {
> if (reg->flags & (1U << j)) {
> --
> 2.34.1
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2023-06-01 5:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 6:20 [PATCH] memblock: Update nid info in memblock debugfs Yuwei Guan
2023-06-01 5:21 ` Mike Rapoport [this message]
2023-06-01 12:33 ` Yuwei Guan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230601052116.GC395338@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ssawgyw@gmail.com \
--cc=wangkefeng.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox