From: "Marc Hartmayer" <mhartmay@linux.ibm.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-mm@kvack.org, linux-s390@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>
Subject: page type is 0, migratetype passed is 2 (nr=256)
Date: Mon, 12 May 2025 16:18:06 +0200 [thread overview]
Message-ID: <87wmalyktd.fsf@linux.ibm.com> (raw)
Hi all,
In a QEMU/KVM guest with 2 vCPUs, when running a test that
enables/disables a vCPU by writing 0 and 1 to the sysfs
`/sys/devices/system/cpu/cpu1/online` in a endless loop and doing some
`dd` operations (block size of 1MB) in the guest in parallel, I
sometimes see the kernel warning:
"page type is 0, migratetype passed is 2 (nr=256)"
The first time this happened was after the warning was added with commit
e0932b6c1f94 (mm: page_alloc: consolidate free page accounting").
Below is a "beautified" (via `decode_stacktrace.sh`) kernel stack trace
(note: it's a self-compiled kernel using the debug config + Linux
v6.15-rc5 + an unrelated patch on top):
```
[ 31.079925] page type is 0, passed migratetype is 2 (nr=256)
[ 31.079967] WARNING: CPU: 0 PID: 512 at mm/page_alloc.c:668 expand (mm/page_alloc.c:668 (discriminator 2) mm/page_alloc.c:1576 (discriminator 2))
[ 31.079974] Modules linked in: essiv authenc dm_crypt encrypted_keys loop pkey_pckmo pkey diag288_wdt watchdog rng_core ghash_s390 prng aes_s390 des_s390 libdes vmw_vsock_virtio_transport vmw_vsock_virtio_transport_common vsock virtio_console vfio_ccw mdev vfio_iommu_type1 sha512_s390 sha256_s390 vfio sha1_s390 sha_common sch_fq_codel drm i2c_core drm_panel_orientation_quirks nfnetlink autofs4 ecdsa_generic ecc
[ 31.080051] Hardware name: IBM 2964 NC9 702 (KVM/Linux)
[ 31.080055] Krnl PSW : 0404f00180000000 000003339b22f52c expand (mm/page_alloc.c:668 (discriminator 10) mm/page_alloc.c:1576 (discriminator 10))
[ 31.080064] R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:3 PM:0 RI:0 EA:3
[ 31.080071] Krnl GPRS: 0000033380000004 0000000000000005 0000000000000030 00000333ffffffff
[ 31.080075] 0000000000000005 0000033380000005 0000000000000100 0000000000000008
[ 31.080080] 000003339cf5e290 00000229260c99d8 ffffffff00000008 000002a8827cc000
[ 31.080084] 000003ffb7d50b58 0000000000000008 000003339b22f528 000002b39be17240
[ 31.080095] Krnl Code: 000003339b22f51c: c02000936173 larl %r2,000003339c49b802
Code starting with the faulting instruction
===========================================
[ 31.080095] 000003339b22f522: c0e5ffe40e37 brasl %r14,000003339aeb1190
[ 31.080095] #000003339b22f528: af000000 mc 0,0
[ 31.080095] >000003339b22f52c: a7f4ff49 brc 15,000003339b22f3be
[ 31.080095] 000003339b22f530: b904002b lgr %r2,%r11
[ 31.080095] 000003339b22f534: c03000933a81 larl %r3,000003339c496a36
[ 31.080095] 000003339b22f53a: c0e5fffdaad3 brasl %r14,000003339b1e4ae0
[ 31.080095] 000003339b22f540: af000000 mc 0,0
[ 31.080123] Call Trace:
[ 31.080126] expand (mm/page_alloc.c:668 (discriminator 10) mm/page_alloc.c:1576 (discriminator 10))
[ 31.080132] expand (mm/page_alloc.c:668 (discriminator 2) mm/page_alloc.c:1576 (discriminator 2))
[ 31.080137] rmqueue_bulk (mm/page_alloc.c:646 mm/page_alloc.c:1592 mm/page_alloc.c:1762 mm/page_alloc.c:2315 mm/page_alloc.c:2368)
[ 31.080142] __rmqueue_pcplist (mm/page_alloc.c:3090)
[ 31.080147] rmqueue.isra.0 (mm/page_alloc.c:3128 mm/page_alloc.c:3159)
[ 31.080153] get_page_from_freelist (mm/page_alloc.c:3687)
[ 31.080158] __alloc_frozen_pages_noprof (mm/page_alloc.c:4971 (discriminator 1))
[ 31.080164] alloc_pages_mpol (mm/mempolicy.c:2303 (discriminator 1))
[ 31.080170] alloc_frozen_pages_noprof (mm/mempolicy.c:2374)
[ 31.080176] allocate_slab (mm/slub.c:2454 mm/slub.c:2618)
[ 31.080182] ___slab_alloc (mm/slub.c:2672 mm/slub.c:3858)
[ 31.080187] __slab_alloc.isra.0 (mm/slub.c:3948)
[ 31.080193] kmem_cache_alloc_noprof (mm/slub.c:4023 mm/slub.c:4184 mm/slub.c:4203)
[ 31.080199] alloc_buffer_head (fs/buffer.c:3033)
[ 31.080204] folio_alloc_buffers (fs/buffer.c:938)
[ 31.080212] create_empty_buffers (fs/buffer.c:1697)
[ 31.080217] __block_write_begin_int (./include/linux/pagemap.h:1025 fs/buffer.c:2134)
[ 31.080222] iomap_write_begin (fs/iomap/buffered-io.c:825)
[ 31.080228] iomap_write_iter (fs/iomap/buffered-io.c:952)
[ 31.080234] iomap_file_buffered_write (fs/iomap/buffered-io.c:1033 (discriminator 1))
[ 31.080240] blkdev_write_iter (block/fops.c:690 block/fops.c:755)
[ 31.080246] vfs_write (fs/read_write.c:592 (discriminator 1) fs/read_write.c:684 (discriminator 1) fs/read_write.c:664
(discriminator 1))
[ 31.080251] ksys_write (fs/read_write.c:737)
[ 31.080257] __do_syscall (arch/s390/kernel/syscall.c:125 (discriminator 2))
[ 31.080262] system_call (arch/s390/kernel/entry.S:263)
[ 31.080268] INFO: lockdep is turned off.
[ 31.080272] Last Breaking-Event-Address:
[ 31.080275] __s390_indirect_jump_r14 (arch/s390/lib/expoline.S:12)
[ 31.080284] Kernel panic - not syncing: kernel: panic_on_warn set ...
[ 31.080294] Hardware name: IBM 2964 NC9 702 (KVM/Linux)
[ 31.080297] Call Trace:
[ 31.080300] dump_stack_lvl (lib/dump_stack.c:122)
[ 31.080305] panic (kernel/panic.c:372)
[ 31.080310] check_panic_on_warn (kernel/panic.c:247)
[ 31.080315] __warn (kernel/panic.c:751)
[ 31.080321] report_bug (lib/bug.c:176 lib/bug.c:215)
[ 31.080327] monitor_event_exception (arch/s390/kernel/traps.c:227 (discriminator 1))
[ 31.080333] __do_pgm_check (./arch/s390/include/asm/irqflags.h:48 (discriminator 1) ./arch/s390/include/asm/irqflags.h:86 (discriminator 1) arch/s390/kernel/traps.c:347 (discriminator 1))
[ 31.080338] pgm_check_handler (arch/s390/kernel/entry.S:334)
[ 31.080344] expand (mm/page_alloc.c:668 (discriminator 10) mm/page_alloc.c:1576 (discriminator 10))
[ 31.080349] expand (mm/page_alloc.c:668 (discriminator 2) mm/page_alloc.c:1576 (discriminator 2))
[ 31.080353] rmqueue_bulk (mm/page_alloc.c:646 mm/page_alloc.c:1592 mm/page_alloc.c:1762 mm/page_alloc.c:2315 mm/page_a
lloc.c:2368)
[ 31.080359] __rmqueue_pcplist (mm/page_alloc.c:3090)
[ 31.080364] rmqueue.isra.0 (mm/page_alloc.c:3128 mm/page_alloc.c:3159)
[ 31.080369] get_page_from_freelist (mm/page_alloc.c:3687)
[ 31.080374] __alloc_frozen_pages_noprof (mm/page_alloc.c:4971 (discriminator 1))
[ 31.080380] alloc_pages_mpol (mm/mempolicy.c:2303 (discriminator 1))
[ 31.080385] alloc_frozen_pages_noprof (mm/mempolicy.c:2374)
[ 31.080390] allocate_slab (mm/slub.c:2454 mm/slub.c:2618)
[ 31.080396] ___slab_alloc (mm/slub.c:2672 mm/slub.c:3858)
[ 31.080401] __slab_alloc.isra.0 (mm/slub.c:3948)
[ 31.080407] kmem_cache_alloc_noprof (mm/slub.c:4023 mm/slub.c:4184 mm/slub.c:4203)
[ 31.080412] alloc_buffer_head (fs/buffer.c:3033)
[ 31.080417] folio_alloc_buffers (fs/buffer.c:938)
[ 31.080422] create_empty_buffers (fs/buffer.c:1697)
[ 31.080427] __block_write_begin_int (./include/linux/pagemap.h:1025 fs/buffer.c:2134)
[ 31.080433] iomap_write_begin (fs/iomap/buffered-io.c:825)
[ 31.080438] iomap_write_iter (fs/iomap/buffered-io.c:952)
[ 31.080444] iomap_file_buffered_write (fs/iomap/buffered-io.c:1033 (discriminator 1))
[ 31.080449] blkdev_write_iter (block/fops.c:690 block/fops.c:755)
[ 31.080455] vfs_write (fs/read_write.c:592 (discriminator 1) fs/read_write.c:684 (discriminator 1) fs/read_write.c:664
(discriminator 1))
[ 31.080460] ksys_write (fs/read_write.c:737)
[ 31.080465] __do_syscall (arch/s390/kernel/syscall.c:125 (discriminator 2))
[ 31.080470] system_call (arch/s390/kernel/entry.S:263)
[ 31.080476] INFO: lockdep is turned off.
```
Any ideas?
--
Thanks in advance,
Marc
next reply other threads:[~2025-05-12 14:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 14:18 Marc Hartmayer [this message]
2025-05-12 16:16 ` page type is 0, migratetype passed is 2 (nr=256) Lorenzo Stoakes
2025-05-12 16:35 ` Zi Yan
2025-05-12 17:14 ` Johannes Weiner
2025-05-20 10:23 ` Marc Hartmayer
2025-06-12 9:05 ` Alexander Gordeev
2025-06-14 8:24 ` Johannes Weiner
2025-08-05 12:02 ` Alexander Gordeev
2025-11-10 14:39 ` Alexander Gordeev
2025-05-13 8:30 ` Marc Hartmayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wmalyktd.fsf@linux.ibm.com \
--to=mhartmay@linux.ibm.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=hannes@cmpxchg.org \
--cc=hca@linux.ibm.com \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.