Greeting, FYI, we noticed the following commit (built with gcc-11): commit: 8ebccd60c2db6beefef2f39b05a95024be0c39eb ("[RFC PATCH v4 3/7] mm/demotion: Build demotion targets based on explicit memory tiers") url: https://github.com/intel-lab-lkp/linux/commits/Aneesh-Kumar-K-V/mm-demotion-Add-support-for-explicit-memory-tiers/20220527-212536 base: https://git.kernel.org/cgit/linux/kernel/git/gregkh/driver-core.git b232b02bf3c205b13a26dcec08e53baddd8e59ed patch link: https://lore.kernel.org/linux-mm/20220527122528.129445-4-aneesh.kumar@linux.ibm.com in testcase: boot on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): If you fix the issue, kindly add following tag Reported-by: kernel test robot [ 2.576581][ T1] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers [ 2.584367][ T1] BUG: sleeping function called from invalid context at mm/compaction.c:540 [ 2.585275][ T1] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 [ 2.586166][ T1] preempt_count: 1, expected: 0 [ 2.586668][ T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc5-00059-g8ebccd60c2db #1 [ 2.587562][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014 [ 2.588577][ T1] Call Trace: [ 2.588948][ T1] [ 2.589284][ T1] dump_stack_lvl+0x34/0x44 [ 2.589765][ T1] __might_resched+0x134/0x149 [ 2.590253][ T1] isolate_freepages_block+0xe6/0x2d3 [ 2.590794][ T1] isolate_freepages_range+0xc5/0x118 [ 2.591342][ T1] alloc_contig_range+0x2dd/0x350 [ 2.591858][ T1] ? alloc_contig_pages+0x170/0x194 [ 2.592384][ T1] alloc_contig_pages+0x170/0x194 [ 2.592896][ T1] init_args+0x3d0/0x44e [ 2.593345][ T1] ? init_args+0x44e/0x44e [ 2.593816][ T1] debug_vm_pgtable+0x46/0x809 [ 2.594312][ T1] ? alloc_inode+0x37/0x8e [ 2.594774][ T1] ? init_args+0x44e/0x44e [ 2.595235][ T1] do_one_initcall+0x83/0x187 [ 2.595729][ T1] do_initcalls+0xc6/0xdf [ 2.596190][ T1] kernel_init_freeable+0x10d/0x13c [ 2.596721][ T1] ? rest_init+0xcd/0xcd [ 2.597170][ T1] kernel_init+0x16/0x11a [ 2.597636][ T1] ret_from_fork+0x22/0x30 [ 2.598097][ T1] [ 2.626547][ T1] ------------[ cut here ]------------ [ 2.627157][ T1] initcall debug_vm_pgtable+0x0/0x809 returned with preemption imbalance [ 2.628019][ T1] WARNING: CPU: 0 PID: 1 at init/main.c:1311 do_one_initcall+0x140/0x187 [ 2.628863][ T1] Modules linked in: [ 2.629280][ T1] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.18.0-rc5-00059-g8ebccd60c2db #1 [ 2.630295][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014 [ 2.631306][ T1] RIP: 0010:do_one_initcall+0x140/0x187 [ 2.631867][ T1] Code: 00 00 48 c7 c6 ca b6 2c 82 48 89 e7 e8 80 ca 44 00 fb 80 3c 24 00 74 14 48 89 e2 48 89 ee 48 c7 c7 df b6 2c 82 e8 b3 d6 a2 00 <0f> 0b 48 8b 44 24 40 65 48 2b 04 25 28 00 00 00 74 05 e8 d8 cd a4 [ 2.633713][ T1] RSP: 0000:ffffc90000013ea8 EFLAGS: 00010286 [ 2.634312][ T1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000003 [ 2.635123][ T1] RDX: 0000000000000216 RSI: 0000000000000001 RDI: 0000000000000001 [ 2.635932][ T1] RBP: ffffffff82f3b694 R08: 0000000000000000 R09: 0000000000000019 [ 2.636735][ T1] R10: 0000000000000000 R11: 0000000074696e69 R12: 0000000000000000 [ 2.637538][ T1] R13: ffff88810cba0000 R14: 0000000000000000 R15: 0000000000000000 [ 2.638353][ T1] FS: 0000000000000000(0000) GS:ffff88842fc00000(0000) knlGS:0000000000000000 [ 2.639253][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.639901][ T1] CR2: ffff88843ffff000 CR3: 0000000002612000 CR4: 00000000000406f0 [ 2.640711][ T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.641526][ T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.642341][ T1] Call Trace: [ 2.642707][ T1] [ 2.643051][ T1] do_initcalls+0xc6/0xdf [ 2.643512][ T1] kernel_init_freeable+0x10d/0x13c [ 2.644045][ T1] ? rest_init+0xcd/0xcd [ 2.644498][ T1] kernel_init+0x16/0x11a [ 2.644956][ T1] ret_from_fork+0x22/0x30 [ 2.645417][ T1] [ 2.645764][ T1] ---[ end trace 0000000000000000 ]--- To reproduce: # build kernel cd linux cp config-5.18.0-rc5-00059-g8ebccd60c2db .config make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 INSTALL_MOD_PATH= modules_install cd find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email # if come across any failure that blocks the test, # please remove ~/.lkp and /lkp dir to run from a clean state. -- 0-DAY CI Kernel Test Service https://01.org/lkp