On Thu, Jun 21, 2012 at 6:47 PM, Yinghai Lu wrote: >> I'm afraid this is too early.  We don't want the region to be unmapped >> yet.  This should only happen after all memblock usages are finished >> which I don't think is the case yet. > > No, it is not early. at that time memblock usage is done. > > Also I tested one system with huge memory, duplicated the problem on > KVM that Sasha met. > my patch fixes the problem. > > please check attached patch. > > Also I add another patch to double check if there is any reference > with reserved.region. > so far there is no reference found. please check attached boot log. free list before patch: [ 0.000000] [0x1017a00000-0x1017ebdfff] [ 0.000000] [0x101f7fb000-0x101fbcffff] [ 0.000000] [0x101fbd6000-0x101fe5cfff] [ 0.000000] [0x101fec6000-0x101fec8fff] [ 0.000000] BUG: unable to handle kernel paging request at ffff88101fec7748 [ 0.000000] IP: [] __next_free_mem_range+0xdc/0x181 free list after patch: [ 0.000000] [0x1017a00000-0x1017ebdfff] [ 0.000000] [0x101f7fb000-0x101fbcffff] [ 0.000000] [0x101fbd6000-0x101fe5cfff] [ 0.000000] [0x101fec8000-0x101fec8fff] [ 0.000000] [0x101fecb000-0x101fecafff] [ 0.000000] [0x101fecd000-0x101feccfff] [ 0.000000] [0x101fec5000-0x101fec7fff] some kind of moving _pa(reserved.region) free to the last. Thanks Yinghai