Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1465298

[PATCH] mm,numa: boot cpu should bound to the node0 when node_off enable

From zhongjiang <zhongjiang@huawei.com>
Newsgroups linux.kernel
Subject [PATCH] mm,numa: boot cpu should bound to the node0 when node_off enable
Date 2016-08-18 15:20 +0200
Message-ID <s7voL-ho-67@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mm,numa: boot cpu should bound to the node0 when node_off enable zhongjiang <zhongjiang@huawei.com> - 2016-08-18 15:20 +0200
  Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable Catalin Marinas <catalin.marinas@arm.com> - 2016-08-18 19:30 +0200
    Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off  enable zhong jiang <zhongjiang@huawei.com> - 2016-08-19 03:50 +0200
    Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off  enable zhong jiang <zhongjiang@huawei.com> - 2016-08-19 04:20 +0200
      Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-08-19 08:20 +0200
        Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off  enable zhong jiang <zhongjiang@huawei.com> - 2016-08-20 11:50 +0200
          Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable Catalin Marinas <catalin.marinas@arm.com> - 2016-08-22 16:30 +0200
            Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off  enable zhong jiang <zhongjiang@huawei.com> - 2016-08-23 09:50 +0200
            Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-08-23 13:40 +0200
              Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-08-23 14:00 +0200
              Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable Will Deacon <will.deacon@arm.com> - 2016-08-23 14:30 +0200
      Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-08-19 08:20 +0200
    Re: [PATCH] mm, numa: boot cpu should bound to the node0 when  node_off enable Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-08-19 04:30 +0200

csiph-web