All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm, numa: boot cpu should bound to the node0 when node_off enable
@ 2016-08-18 13:09 ` zhongjiang
  0 siblings, 0 replies; 27+ messages in thread
From: zhongjiang @ 2016-08-18 13:09 UTC (permalink / raw)
  To: linux-arm-kernel

At present, boot cpu will bound to a node from device tree when node_off enable.
if the node is not initialization, it will lead to a following problem.

 next_zones_zonelist+0x18/0x80
 __build_all_zonelists+0x1e0/0x288
 build_all_zonelists_init+0x10/0x1c
 build_all_zonelists+0x114/0x128
 start_kernel+0x1a0/0x414

The patch fix it by fallback to node 0. therefore, the cpu will bound to the node
correctly.

Signed-off-by: zhongjiang <zhongjiang@huawei.com>
---
 arch/arm64/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index 4dcd7d6..1f8f5da 100644
--- a/arch/arm64/mm/numa.c
+++ b/arch/arm64/mm/numa.c
@@ -119,7 +119,7 @@ void numa_store_cpu_info(unsigned int cpu)
 void __init early_map_cpu_to_node(unsigned int cpu, int nid)
 {
 	/* fallback to node 0 */
-	if (nid < 0 || nid >= MAX_NUMNODES)
+	if (nid < 0 || nid >= MAX_NUMNODES || numa_off)
 		nid = 0;
 
 	cpu_to_node_map[cpu] = nid;
-- 
1.7.12.4

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

end of thread, other threads:[~2016-08-23 12:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 13:09 [PATCH] mm, numa: boot cpu should bound to the node0 when node_off enable zhongjiang
2016-08-18 13:09 ` [PATCH] mm,numa: " zhongjiang
2016-08-18 16:04 ` [PATCH] mm, numa: " Catalin Marinas
2016-08-18 16:04   ` Catalin Marinas
2016-08-18 17:45   ` Ganapatrao Kulkarni
2016-08-18 17:45     ` Ganapatrao Kulkarni
2016-08-19  1:41     ` zhong jiang
2016-08-19  1:41       ` zhong jiang
2016-08-19  1:58     ` zhong jiang
2016-08-19  1:58       ` zhong jiang
2016-08-19  4:00       ` Ganapatrao Kulkarni
2016-08-19  4:00         ` Ganapatrao Kulkarni
2016-08-19  4:11         ` Ganapatrao Kulkarni
2016-08-19  4:11           ` Ganapatrao Kulkarni
2016-08-20  9:38           ` zhong jiang
2016-08-20  9:38             ` zhong jiang
2016-08-22 14:28             ` Catalin Marinas
2016-08-22 14:28               ` Catalin Marinas
2016-08-23  7:47               ` zhong jiang
2016-08-23  7:47                 ` zhong jiang
2016-08-23  7:54               ` Leizhen (ThunderTown)
2016-08-23 11:19               ` Leizhen (ThunderTown)
2016-08-23 11:19                 ` Leizhen (ThunderTown)
2016-08-23 11:30                 ` Will Deacon
2016-08-23 11:30                   ` Will Deacon
2016-08-23 11:50                   ` Leizhen (ThunderTown)
2016-08-23 11:50                     ` Leizhen (ThunderTown)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.