From: Andrew Morton <akpm@linux-foundation.org>
To: Gang Li <ligang.bdlg@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
Muchun Song <songmuchun@bytedance.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm, hugetlb: skip irrelevant nodes in show_free_areas()
Date: Tue, 5 Jul 2022 14:25:47 -0700 [thread overview]
Message-ID: <20220705142547.da3ea5a7383a7eeec3a93665@linux-foundation.org> (raw)
In-Reply-To: <20220705092120.2158-1-ligang.bdlg@bytedance.com>
On Tue, 5 Jul 2022 17:21:19 +0800 Gang Li <ligang.bdlg@bytedance.com> wrote:
> show_free_areas() allows to filter out node specific data which is
> irrelevant to the allocation request. But hugetlb_show_meminfo() still
> shows hugetlb on all nodes, which is redundant and unnecessary.
>
> Use show_mem_node_skip() to skip irrelevant nodes. And replace
> hugetlb_show_meminfo() with hugetlb_show_meminfo_node(nid).
It would be helpful to include before-and-after sample output text in
the changelog to help others assess the proposed change.
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6202,7 +6202,11 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
> printk(KERN_CONT "= %lukB\n", K(total));
> }
>
> - hugetlb_show_meminfo();
> + for_each_online_node(nid) {
> + if (show_mem_node_skip(filter, nid, nodemask))
> + continue;
> + hugetlb_show_meminfo_node(nid);
> + }
>
Does this mean that potentially useful info about presently-offline
nodes will no longer be available?
next prev parent reply other threads:[~2022-07-05 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 9:21 Gang Li
2022-07-05 9:33 ` Muchun Song
2022-07-05 21:25 ` Andrew Morton [this message]
2022-07-05 22:06 ` Mike Kravetz
2022-07-05 22:54 ` Mike Kravetz
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=20220705142547.da3ea5a7383a7eeec3a93665@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ligang.bdlg@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=songmuchun@bytedance.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