Re: [PATCH] mm/alloc: fallback to first node if the wanted node offline

From: Vlastimil Babka
Date: Wed Dec 05 2018 - 04:40:25 EST


On 12/5/18 10:29 AM, Pingfan Liu wrote:
>> [ 0.007418] Early memory node ranges
>> [ 0.007419] node 1: [mem 0x0000000000001000-0x000000000008efff]
>> [ 0.007420] node 1: [mem 0x0000000000090000-0x000000000009ffff]
>> [ 0.007422] node 1: [mem 0x0000000000100000-0x000000005c3d6fff]
>> [ 0.007422] node 1: [mem 0x00000000643df000-0x0000000068ff7fff]
>> [ 0.007423] node 1: [mem 0x000000006c528000-0x000000006fffffff]
>> [ 0.007424] node 1: [mem 0x0000000100000000-0x000000047fffffff]
>> [ 0.007425] node 5: [mem 0x0000000480000000-0x000000087effffff]
>>
>> There is clearly no node2. Where did the driver get the node2 from?

I don't understand these tables too much, but it seems the other nodes
exist without them:

[ 0.007393] SRAT: PXM 2 -> APIC 0x20 -> Node 2

Maybe the nodes are hotplugable or something?

> Since using nr_cpus=4 , the node2 is not be instanced by x86 initalizing code.

Indeed, nr_cpus seems to restrict what nodes we allocate and populate
zonelists for.