Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674422
| From | Wei Yang <richard.weiyang@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mm/memory_hotplug: just build zonelist for new added node |
| Date | 2017-06-26 06:10 +0200 |
| Message-ID | <tWtvA-5SD-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
In commit (9adb62a5df9c0fbef7) "mm/hotplug: correctly setup fallback
zonelists when creating new pgdat" tries to build the correct zonelist for
a new added node, while it is not necessary to rebuild it for already exist
nodes.
In build_zonelists(), it will iterate on nodes with memory. For a new added
node, it will have memory until node_states_set_node() is called in
online_pages().
This patch will avoid to rebuild the zonelists for already exist nodes.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
mm/page_alloc.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 560eafe8234d..fc8181b44fd8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5200,15 +5200,17 @@ static int __build_all_zonelists(void *data)
memset(node_load, 0, sizeof(node_load));
#endif
- if (self && !node_online(self->node_id)) {
+ /* This node is hotadded and no memory preset yet.
+ * So just build zonelists is fine, no need to touch other nodes.
+ */
+ if (self && !node_online(self->node_id))
build_zonelists(self);
- }
-
- for_each_online_node(nid) {
- pg_data_t *pgdat = NODE_DATA(nid);
+ else
+ for_each_online_node(nid) {
+ pg_data_t *pgdat = NODE_DATA(nid);
- build_zonelists(pgdat);
- }
+ build_zonelists(pgdat);
+ }
/*
* Initialize the boot_pagesets that are going to be used
--
2.11.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mm/memory_hotplug: just build zonelist for new added node Wei Yang <richard.weiyang@gmail.com> - 2017-06-26 06:10 +0200
Re: [PATCH] mm/memory_hotplug: just build zonelist for new added node Vlastimil Babka <vbabka@suse.cz> - 2017-06-28 09:10 +0200
Re: [PATCH] mm/memory_hotplug: just build zonelist for new added node Wei Yang <richard.weiyang@gmail.com> - 2017-06-28 09:30 +0200
Re: [PATCH] mm/memory_hotplug: just build zonelist for new added node Michal Hocko <mhocko@kernel.org> - 2017-06-28 11:30 +0200
Re: [PATCH] mm/memory_hotplug: just build zonelist for new added node Vlastimil Babka <vbabka@suse.cz> - 2017-06-28 11:40 +0200
Re: [PATCH] mm/memory_hotplug: just build zonelist for new added node Michal Hocko <mhocko@kernel.org> - 2017-06-28 11:50 +0200
csiph-web