FYI, we noticed the following commit:
commit: be28be8d42f71f65fb62bd34c60a159907b98fd3 ("mm: Clear accessing sub-page last
when clearing huge page")
git://bee.sh.intel.com/git/yhuang/linux.git clear_huge_page_hint
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -cpu IvyBridge -smp 4 -m 2G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+------------------------------------------+------------+------------+
| | f7de4abc17 | be28be8d42 |
+------------------------------------------+------------+------------+
| boot_successes | 12 | 4 |
| boot_failures | 0 | 8 |
| kernel_BUG_at_mm/memory.c | 0 | 8 |
| invalid_opcode:#[##]PREEMPT_SMP | 0 | 8 |
| Kernel_panic-not_syncing:Fatal_exception | 0 | 8 |
+------------------------------------------+------------+------------+
[ 11.775224] kernel BUG at mm/memory.c:4175!
[ 11.776009] invalid opcode: 0000 [#1] PREEMPT SMP
[ 11.776009] CPU: 3 PID: 226 Comm: systemd-journal Not tainted 4.10.0-mm1-00416-gbe28be8
#22
[ 11.778200] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.9.3-20161025_171302-gandalf 04/01/2014
[ 11.778200] task: ffff8800584bb000 task.stack: ffffc900001fc000
[ 11.778200] RIP: 0010:clear_huge_page+0x1ce/0x522
[ 11.782477] RSP: 0000:ffffc900001ffd60 EFLAGS: 00010206
[ 11.782477] RAX: 00007fae8d000200 RBX: 0000000000000200 RCX: 00007fae8d0c4000
[ 11.785574] RDX: 00007fae8d000200 RSI: 000000000000104d RDI: ffffffff8222b91d
[ 11.785574] RBP: ffffc900001ffda0 R08: 0000000000000000 R09: 00000000001dc173
[ 11.785574] R10: 00000000001dc128 R11: fffffffffffffffc R12: ffff880077075000
[ 11.785574] R13: 00007fae8d0c4000 R14: 00007fae8d000000 R15: ffff8800768fb9c0
[ 11.785574] FS: 00007fae90327880(0000) GS:ffff880075000000(0000)
knlGS:0000000000000000
[ 11.785574] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 11.785574] CR2: 00007fae8d0c4000 CR3: 0000000055ff7000 CR4: 00000000001406e0
[ 11.785574] Call Trace:
[ 11.785574] ? __raw_spin_lock_init+0x2e/0x4c
[ 11.785574] do_huge_pmd_anonymous_page+0x2f0/0x4ab
[ 11.785574] ? sched_clock+0x9/0xd
[ 11.785574] __handle_mm_fault+0x292/0x9bf
[ 11.785574] handle_mm_fault+0xdc/0x11c
[ 11.785574] __do_page_fault+0x24d/0x404
[ 11.785574] do_page_fault+0x22/0x27
[ 11.785574] do_async_page_fault+0x18/0x44
[ 11.785574] async_page_fault+0x25/0x30
[ 11.785574] RIP: 0033:0x7fae8f5948ac
[ 11.785574] RSP: 002b:00007ffe65d04cf8 EFLAGS: 00010202
[ 11.785574] RAX: 00007fae8cec3010 RBX: 000055a5796ab620 RCX: 00007fae8cec3040
[ 11.785574] RDX: 0000000000201000 RSI: 0000000000000000 RDI: 00007fae8cec3010
[ 11.785574] RBP: 00007ffe65d04f20 R08: ffffffffffffffff R09: 0000000000000000
[ 11.785574] R10: 000000000000034c R11: 00007fae8f594850 R12: 0000000000000000
[ 11.785574] R13: 00007ffe65d04db0 R14: 0000000000000000 R15: 00007fae8f0ff210
[ 11.785574] Code: b9 22 82 48 89 4d d0 e8 00 a7 f6 ff 48 8b 4d d0 89 da 49 39 ce 48 89
c8 49 0f 43 c6 4c 01 f2 48 39 d0 48 0f 47 c2 48 39 c1 74 02 <0f> 0b 4c 29 f1 48 c1
e9 0c 44 8d 2c 09 89 4d d0 44 39 eb 0f 82
[ 11.785574] RIP: clear_huge_page+0x1ce/0x522 RSP: ffffc900001ffd60
[ 11.786034] ---[ end trace 528324176fa81897 ]---
To reproduce:
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/wfg/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this
email
Thanks,
Xiaolong