From: Ingo Molnar <mingo@kernel.org>
To: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: akpm@linux-foundation.org, rppt@kernel.org, david@redhat.com,
vbabka@suse.cz, mhocko@suse.com, willy@infradead.org,
mgorman@techsingularity.net, aneesh.kumar@linux.ibm.com,
ying.huang@intel.com, hannes@cmpxchg.org, osalvador@suse.de,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v3 2/2] mm: memory_hotplug: drop memoryless node from fallback lists
Date: Fri, 20 Oct 2023 10:32:13 +0200 [thread overview]
Message-ID: <ZTI7DRNdObvSZXFG@gmail.com> (raw)
In-Reply-To: <9f1dbe7ee1301c7163b2770e32954ff5e3ecf2c4.1697711415.git.zhengqi.arch@bytedance.com>
* Qi Zheng <zhengqi.arch@bytedance.com> wrote:
> In offline_pages(), if a node becomes memoryless, we
> will clear its N_MEMORY state by calling node_states_clear_node().
> But we do this after rebuilding the zonelists by calling
> build_all_zonelists(), which will cause this memoryless node to
> still be in the fallback list of other nodes. This will incur
> some runtime overhead.
>
> To drop memoryless node from fallback lists in this case, just
> call node_states_clear_node() before calling build_all_zonelists().
s/memoryless node
/memoryless nodes
>
> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
> Acked-by: David Hildenbrand <david@redhat.com>
> ---
> mm/memory_hotplug.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index d4a364fdaf8f..f019f7d6272c 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -2036,12 +2036,16 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages,
> /* reinitialise watermarks and update pcp limits */
> init_per_zone_wmark_min();
>
> + /*
> + * Make sure to mark the node as memory-less before rebuilding the zone
> + * list. Otherwise this node would still appear in the fallback lists.
> + */
> + node_states_clear_node(node, &arg);
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
next prev parent reply other threads:[~2023-10-20 8:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 10:43 [PATCH v3 0/2] handle memoryless nodes more appropriately Qi Zheng
2023-10-19 10:43 ` [PATCH v3 1/2] mm: page_alloc: skip memoryless nodes entirely Qi Zheng
2023-10-20 8:31 ` Ingo Molnar
2023-10-20 9:09 ` Qi Zheng
2023-10-19 10:43 ` [PATCH v3 2/2] mm: memory_hotplug: drop memoryless node from fallback lists Qi Zheng
2023-10-20 7:05 ` Huang, Ying
2023-10-20 7:35 ` Qi Zheng
2023-10-23 1:18 ` Huang, Ying
2023-10-23 2:53 ` Qi Zheng
2023-10-23 3:10 ` Huang, Ying
2023-10-23 3:17 ` Qi Zheng
2023-10-23 18:19 ` Andrew Morton
2023-10-20 8:32 ` Ingo Molnar [this message]
2023-10-20 9:10 ` Qi Zheng
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=ZTI7DRNdObvSZXFG@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=rppt@kernel.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
--cc=zhengqi.arch@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;
as well as URLs for NNTP newsgroup(s).