linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/numa: carve node online semantics out of alloc_node_data()
@ 2019-07-05  4:15 Pingfan Liu
  2019-07-05  4:15 ` [PATCH 2/2] x86/numa: instance all parsed numa node Pingfan Liu
  0 siblings, 1 reply; 14+ messages in thread
From: Pingfan Liu @ 2019-07-05  4:15 UTC (permalink / raw)
  To: x86
  Cc: Pingfan Liu, Michal Hocko, Dave Hansen, Mike Rapoport, Tony Luck,
	Andy Lutomirski, Peter Zijlstra, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, H. Peter Anvin, Andrew Morton, Vlastimil Babka,
	Oscar Salvador, Pavel Tatashin, Mel Gorman,
	Benjamin Herrenschmidt, Michael Ellerman, Stephen Rothwell,
	Qian Cai, Barret Rhoden, Bjorn Helgaas, David Rientjes, linux-mm,
	linux-kernel

Node online means either memory online or cpu online. But there is
requirement to instance a pglist_data, which has neither cpu nor memory
online (refer to [2/2]).

So carve out the online semantics, and call node_set_online() where either
memory or cpu is online.

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pavel Tatashin <pavel.tatashin@microsoft.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Qian Cai <cai@lca.pw>
Cc: Barret Rhoden <brho@google.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: David Rientjes <rientjes@google.com>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
 arch/x86/mm/numa.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index e6dad60..b48d507 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -213,8 +213,6 @@ static void __init alloc_node_data(int nid)
 
 	node_data[nid] = nd;
 	memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
-
-	node_set_online(nid);
 }
 
 /**
@@ -589,6 +587,7 @@ static int __init numa_register_memblks(struct numa_meminfo *mi)
 			continue;
 
 		alloc_node_data(nid);
+		node_set_online(nid);
 	}
 
 	/* Dump memblock with node info and return. */
@@ -760,8 +759,10 @@ void __init init_cpu_to_node(void)
 		if (node == NUMA_NO_NODE)
 			continue;
 
-		if (!node_online(node))
+		if (!node_online(node)) {
 			init_memory_less_node(node);
+			node_set_online(nid);
+		}
 
 		numa_set_node(cpu, node);
 	}
-- 
2.7.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-07-10 11:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05  4:15 [PATCH 1/2] x86/numa: carve node online semantics out of alloc_node_data() Pingfan Liu
2019-07-05  4:15 ` [PATCH 2/2] x86/numa: instance all parsed numa node Pingfan Liu
2019-07-07 19:44   ` Thomas Gleixner
2019-07-08  8:36     ` Pingfan Liu
2019-07-08  9:35       ` Thomas Gleixner
2019-07-08 17:53         ` Andy Lutomirski
2019-07-08 18:26           ` Thomas Gleixner
2019-07-09  4:26           ` Pingfan Liu
2019-07-09  4:16         ` Pingfan Liu
2019-07-09  6:12           ` Thomas Gleixner
2019-07-09  7:24             ` Pingfan Liu
2019-07-09 13:34               ` Andy Lutomirski
2019-07-10  8:40                 ` Pingfan Liu
2019-07-10 11:39                   ` Thomas Gleixner

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).