On 10 Jun 2021, at 7:18, Mel Gorman wrote: > On Wed, Jun 09, 2021 at 02:30:18PM -0400, Zi Yan wrote: >> On 3 Jun 2021, at 10:22, Mel Gorman wrote: >>> Signed-off-by: Mel Gorman >>> Acked-by: Vlastimil Babka >>> --- >>> include/linux/mmzone.h | 20 +++++- >>> mm/internal.h | 2 +- >>> mm/page_alloc.c | 159 +++++++++++++++++++++++++++++------------ >>> mm/swap.c | 2 +- >>> 4 files changed, 135 insertions(+), 48 deletions(-) >>> >> >> Hi Mel, >> >> I am not able to boot my QEMU VM with v5.13-rc5-mmotm-2021-06-07-18-33. >> git bisect points to this patch. The VM got stuck at ???Booting from ROM??????. >> >> My kernel config is attached and my qemu command is: >> >> qemu-system-x86_64 -kernel ~/repos/linux-1gb-thp/arch/x86/boot/bzImage \ >> -drive file=~/qemu-image/vm.qcow2,if=virtio \ >> -append "nokaslr root=/dev/vda1 rw console=ttyS0 " \ >> -pidfile vm.pid \ >> -netdev user,id=mynet0,hostfwd=tcp::11022-:22 \ >> -device virtio-net-pci,netdev=mynet0 \ >> -m 16g -smp 6 -cpu host -enable-kvm -nographic \ >> -machine hmat=on -object memory-backend-ram,size=8g,id=m0 \ >> -object memory-backend-ram,size=8g,id=m1 \ >> -numa node,memdev=m0,nodeid=0 -numa node,memdev=m1,nodeid=1 >> >> The attached config has THP disabled. The VM cannot boot with THP enabled, >> either. >> > > There is not a lot of information to go on here. Can you confirm that a > revert of that specific patch from mmotm-2021-06-07-18-33 also boots? It > sounds like your console log is empty, does anything useful appear if > you add "earlyprintk=serial,ttyS0,115200" to the kernel command line? Sure. I can confirm that reverting the patch makes the VM boot. The important information I forgot to mention is that after I remove the NUMA setting in the QEMU, the VM can boot too. earlyprintk gave the error message (page out of zone boundary) when the VM could not boot: [ 0.120569] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.161237] Memory: 16396772K/16776684K available (18452K kernel code, 3336K rwdata, 8000K rodata, 1852K init, 1444K bss, 379656K reserved, 0K cma-reserve) [ 0.162451] page 0x100041 outside node 1 zone Normal [ 0x240000 - 0x440000 ] [ 0.163057] page:(____ptrval____) refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100041 [ 0.163863] flags: 0x200000000000000(node=0|zone=2) [ 0.164283] raw: 0200000000000000 dead000000000100 dead000000000122 0000000000000000 [ 0.164950] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 0.165621] page dumped because: VM_BUG_ON_PAGE(page && bad_range(zone, page)) [ 0.166617] ------------[ cut here ]------------ [ 0.167355] kernel BUG at mm/page_alloc.c:3764! [ 0.168079] invalid opcode: 0000 [#1] SMP NOPTI [ 0.168801] CPU: 0 PID: 0 Comm: swapper Not tainted 5.13.0-rc5-mm1+ #381 [ 0.169870] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 [ 0.171057] RIP: 0010:get_page_from_freelist+0x10e5/0x1410 [ 0.171763] Code: 4c 24 18 4c 89 ee 8b 14 24 e8 67 d8 fc ff e9 af f6 ff ff 45 31 ff e9 41 fe ff ff 48 c7 c6 60 51 a3 82 4c 89 ff e8 db 82 fd ff <0f> 0b 658 [ 0.174173] RSP: 0000:ffffffff82c03d08 EFLAGS: 00010046 [ 0.174767] RAX: 0000000000000042 RBX: ffff88843fffad00 RCX: 00000000ffffdfff [ 0.175381] RDX: 0000000000000000 RSI: 00000000ffffffea RDI: 0000000000000000 [ 0.175998] RBP: ffff888237c28300 R08: ffffffff82d509c8 R09: 0000000000009ffb [ 0.176613] R10: 00000000ffffe000 R11: 3fffffffffffffff R12: ffff888237c28408 [ 0.177229] R13: 0000000000000000 R14: 0000000000000001 R15: ffffea0004001040 [ 0.177852] FS: 0000000000000000(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 [ 0.178550] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.179045] CR2: ffff88843ffff000 CR3: 0000000002c0c000 CR4: 00000000000406b0 [ 0.179664] Call Trace: [ 0.179876] ? should_fail_alloc_page+0x5/0x10 [ 0.180260] ? prepare_alloc_pages+0xb4/0x190 [ 0.180637] __alloc_pages+0xe6/0x210 [ 0.180952] allocate_slab+0x9a/0x470 [ 0.181275] __kmem_cache_create+0x259/0x510 [ 0.181645] create_boot_cache+0x72/0x96 [ 0.181998] kmem_cache_init+0xb4/0x17b [ 0.182332] start_kernel+0x3d5/0x695 [ 0.182649] ? x86_family+0x5/0x20 [ 0.182945] secondary_startup_64_no_verify+0xb0/0xbb [ 0.183383] Modules linked in: [ 0.183649] random: get_random_bytes called from oops_exit+0x35/0x60 with crng_init=0 [ 0.183655] ---[ end trace 5a27ab5b99c01a0e ]--- [ 0.184731] RIP: 0010:get_page_from_freelist+0x10e5/0x1410 [ 0.185203] Code: 4c 24 18 4c 89 ee 8b 14 24 e8 67 d8 fc ff e9 af f6 ff ff 45 31 ff e9 41 fe ff ff 48 c7 c6 60 51 a3 82 4c 89 ff e8 db 82 fd ff <0f> 0b 658 [ 0.186828] RSP: 0000:ffffffff82c03d08 EFLAGS: 00010046 [ 0.187283] RAX: 0000000000000042 RBX: ffff88843fffad00 RCX: 00000000ffffdfff [ 0.187900] RDX: 0000000000000000 RSI: 00000000ffffffea RDI: 0000000000000000 [ 0.188522] RBP: ffff888237c28300 R08: ffffffff82d509c8 R09: 0000000000009ffb [ 0.189134] R10: 00000000ffffe000 R11: 3fffffffffffffff R12: ffff888237c28408 [ 0.189752] R13: 0000000000000000 R14: 0000000000000001 R15: ffffea0004001040 [ 0.190374] FS: 0000000000000000(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 [ 0.191074] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.191572] CR2: ffff88843ffff000 CR3: 0000000002c0c000 CR4: 00000000000406b0 [ 0.192188] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.192791] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- — Best Regards, Yan, Zi