Message ID | 1476935576-59941-2-git-send-email-guohanjun@huawei.com |
---|---|
State | New |
Headers | show |
On Thu, Oct 20, 2016 at 11:52:56AM +0800, Hanjun Guo wrote: > From: Hanjun Guo <hanjun.guo@linaro.org> > > When booting on NUMA system with memory-less node (no > memory dimm on this memory controller), the print > for setup_node_data() is incorrect: > > NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] > > It should be 0, not 0xffffffffffffffff as there is > no memory on that node. Wouldn't it make more sense to print something useful, like "memory-less node"? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On 2016/10/20 18:51, Will Deacon wrote: > On Thu, Oct 20, 2016 at 11:52:56AM +0800, Hanjun Guo wrote: >> From: Hanjun Guo <hanjun.guo@linaro.org> >> >> When booting on NUMA system with memory-less node (no >> memory dimm on this memory controller), the print >> for setup_node_data() is incorrect: >> >> NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] >> >> It should be 0, not 0xffffffffffffffff as there is >> no memory on that node. > Wouldn't it make more sense to print something useful, like "memory-less > node"? in the log, [ 0.000000] NUMA: Initmem setup node 0 [mem 0x00000000-0x13fbffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x13fbffe500-0x13fbffffff] [ 0.000000] NUMA: Initmem setup node 1 [mem 0x1400000000-0x17fbffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfec500-0x17fbfedfff] [ 0.000000] NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfeaa00-0x17fbfec4ff] [ 0.000000] NUMA: NODE_DATA(2) on node 1 [ 0.000000] NUMA: Initmem setup node 3 [mem 0x00000000-0xffffffffffffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfe8f00-0x17fbfea9ff] [ 0.000000] NUMA: NODE_DATA(3) on node 1 if printing "NUMA: Initmem setup node 2 [mem 0x00000000-0x00000000]", it will make the log consistent with others, and obvious it's a memory-less node as memory range 0x00000000-0x00000000, what do you think? Thanks Hanjun _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Thu, Oct 20, 2016 at 08:21:37PM +0800, Hanjun Guo wrote: > On 2016/10/20 18:51, Will Deacon wrote: > > On Thu, Oct 20, 2016 at 11:52:56AM +0800, Hanjun Guo wrote: > >> From: Hanjun Guo <hanjun.guo@linaro.org> > >> > >> When booting on NUMA system with memory-less node (no > >> memory dimm on this memory controller), the print > >> for setup_node_data() is incorrect: > >> > >> NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] > >> > >> It should be 0, not 0xffffffffffffffff as there is > >> no memory on that node. > > Wouldn't it make more sense to print something useful, like "memory-less > > node"? > > in the log, > > [ 0.000000] NUMA: Initmem setup node 0 [mem 0x00000000-0x13fbffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x13fbffe500-0x13fbffffff] > [ 0.000000] NUMA: Initmem setup node 1 [mem 0x1400000000-0x17fbffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfec500-0x17fbfedfff] > [ 0.000000] NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfeaa00-0x17fbfec4ff] > [ 0.000000] NUMA: NODE_DATA(2) on node 1 > [ 0.000000] NUMA: Initmem setup node 3 [mem 0x00000000-0xffffffffffffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfe8f00-0x17fbfea9ff] > [ 0.000000] NUMA: NODE_DATA(3) on node 1 > > if printing "NUMA: Initmem setup node 2 [mem 0x00000000-0x00000000]", > it will make the log consistent with others, and obvious it's a memory-less > node as memory range 0x00000000-0x00000000, what do you think? How is that more obvious than printing the string "memory-less node"? Is this data parsed by something? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Thu, Oct 20, 2016 at 08:21:37PM +0800, Hanjun Guo wrote: > On 2016/10/20 18:51, Will Deacon wrote: > > On Thu, Oct 20, 2016 at 11:52:56AM +0800, Hanjun Guo wrote: > >> From: Hanjun Guo <hanjun.guo@linaro.org> > >> > >> When booting on NUMA system with memory-less node (no > >> memory dimm on this memory controller), the print > >> for setup_node_data() is incorrect: > >> > >> NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] > >> > >> It should be 0, not 0xffffffffffffffff as there is > >> no memory on that node. > > Wouldn't it make more sense to print something useful, like "memory-less > > node"? > > in the log, > > [ 0.000000] NUMA: Initmem setup node 0 [mem 0x00000000-0x13fbffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x13fbffe500-0x13fbffffff] > [ 0.000000] NUMA: Initmem setup node 1 [mem 0x1400000000-0x17fbffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfec500-0x17fbfedfff] > [ 0.000000] NUMA: Initmem setup node 2 [mem 0x00000000-0xffffffffffffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfeaa00-0x17fbfec4ff] > [ 0.000000] NUMA: NODE_DATA(2) on node 1 > [ 0.000000] NUMA: Initmem setup node 3 [mem 0x00000000-0xffffffffffffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x17fbfe8f00-0x17fbfea9ff] > [ 0.000000] NUMA: NODE_DATA(3) on node 1 > > if printing "NUMA: Initmem setup node 2 [mem 0x00000000-0x00000000]", Seeing "NUMA: Initmem setup node 2 [<memoryless node>]" would be far more obvious as a memoryless node, and I don't see that this would be inconsistent. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index 34415fc..148e1fc 100644 --- a/arch/arm64/mm/numa.c +++ b/arch/arm64/mm/numa.c @@ -227,7 +227,8 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) int tnid; pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n", - nid, start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1); + nid, start_pfn << PAGE_SHIFT, + end_pfn ? (end_pfn << PAGE_SHIFT) - 1 : 0); nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); nd = __va(nd_pa);