FYI, we noticed the following commit (built with gcc-6): commit: b39ab98e2f4728d98973fd1bc531e3c4cbccb21c ("Mark 'ioremap_page_range()' as possibly sleeping") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master in testcase: unixbench with following parameters: runtime: 300s nr_task: 1 test: pipe cpufreq_governor: performance test-description: UnixBench is the original BYTE UNIX benchmark suite aims to test performance of Unix-like system. test-url: https://github.com/kdlucas/byte-unixbench on test machine: 16 threads Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz with 8G memory caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +---------------------------------------------------------------------------------+------------+------------+ | | daea3daaf9 | b39ab98e2f | +---------------------------------------------------------------------------------+------------+------------+ | boot_successes | 100 | 5 | | boot_failures | 1 | 71 | | WARNING:DIRECTORY_MODE_IS_ENABLED.SOME_ERROR_INJECTIONS_MIGHT_NOT_WORK | 1 | 1 | | BUG:unable_to_handle_kernel | 1 | 1 | | Oops:#[##] | 1 | 1 | | RIP:copy_page | 1 | 2 | | Kernel_panic-not_syncing:Fatal_exception | 1 | 1 | | BUG:sleeping_function_called_from_invalid_context_at_lib/ioremap.c | 0 | 71 | | RIP:native_write_msr | 0 | 32 | | RIP:intel_idle | 0 | 33 | | WARNING:at_kernel/sched/core.c:#__might_sleep | 0 | 54 | | RIP:__might_sleep | 0 | 50 | +---------------------------------------------------------------------------------+------------+------------+ kern :err : [ 7.190959] BUG: sleeping function called from invalid context at lib/ioremap.c:164 kern :err : [ 7.191944] in_atomic(): 1, irqs_disabled(): 1, pid: 1, name: swapper/0 kern :warn : [ 7.191944] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc7-00006-gb39ab98 #1 kern :warn : [ 7.191944] Hardware name: Supermicro SYS-5018D-FN4T/X10SDV-8C-TLN4F, BIOS 1.1 03/02/2016 kern :warn : [ 7.191944] Call Trace: kern :warn : [ 7.191944] dump_stack+0x63/0x86 kern :warn : [ 7.191944] ___might_sleep+0xf1/0x110 kern :warn : [ 7.191944] __might_sleep+0x4a/0x80 kern :warn : [ 7.191944] ioremap_page_range+0x34/0x3c0 kern :warn : [ 7.191944] ? iomem_map_sanity_check+0x84/0xd0 kern :warn : [ 7.191944] ghes_copy_tofrom_phys+0x182/0x2b0 kern :warn : [ 7.191944] ghes_read_estatus+0x76/0x140 kern :warn : [ 7.191944] ghes_proc+0x1c/0x130 kern :warn : [ 7.191944] ghes_probe+0x157/0x430 kern :warn : [ 7.191944] platform_drv_probe+0x3b/0xa0 kern :warn : [ 7.191944] driver_probe_device+0x29c/0x450 kern :warn : [ 7.191944] __driver_attach+0xdf/0xf0 kern :warn : [ 7.191944] ? driver_probe_device+0x450/0x450 kern :warn : [ 7.191944] bus_for_each_dev+0x60/0xa0 kern :warn : [ 7.191944] driver_attach+0x1e/0x20 kern :warn : [ 7.191944] bus_add_driver+0x170/0x260 kern :warn : [ 7.191944] ? set_debug_rodata+0x17/0x17 kern :warn : [ 7.191944] driver_register+0x60/0xe0 kern :warn : [ 7.191944] __platform_driver_register+0x36/0x40 kern :warn : [ 7.191944] ghes_init+0x10f/0x199 kern :warn : [ 7.191944] ? bert_init+0x215/0x215 kern :warn : [ 7.191944] do_one_initcall+0x43/0x170 kern :warn : [ 7.191944] ? set_debug_rodata+0x17/0x17 kern :warn : [ 7.191944] kernel_init_freeable+0x198/0x220 kern :warn : [ 7.191944] ? rest_init+0xd0/0xd0 kern :warn : [ 7.191944] kernel_init+0xe/0x101 kern :warn : [ 7.191944] ret_from_fork+0x25/0x30 kern :info : [ 7.329086] GHES: APEI firmware first mode is enabled by APEI bit and WHEA _OSC. kern :info : [ 7.336598] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled kern :info : [ 7.363429] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A kern :info : [ 7.391337] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A kern :info : [ 7.399051] Non-volatile memory driver v1.3 kern :info : [ 7.403276] Linux agpgart interface v0.103 kern :info : [ 7.408711] mei_me 0000:00:16.0: Device doesn't have valid ME Interface kern :warn : [ 7.415442] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000428-0x000000000000042F (\GPE0) (20170728/utaddress-247) kern :info : [ 7.430902] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver kern :warn : [ 7.441066] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x000000000000052C-0x000000000000052D (\GPIV) (20170728/utaddress-247) kern :info : [ 7.456517] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver kern :warn : [ 7.466690] lpc_ich: Resource conflict(s) found affecting gpio_ich kern :info : [ 7.472929] rdac: device handler registered kern :info : [ 7.477216] hp_sw: device handler registered kern :info : [ 7.481488] emc: device handler registered kern :info : [ 7.485691] alua: device handler registered kern :info : [ 7.489906] libphy: Fixed MDIO Bus: probed kern :info : [ 7.494038] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI kern :info : [ 7.501082] e1000: Copyright (c) 1999-2006 Intel Corporation. kern :info : [ 7.506843] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k kern :info : [ 7.512670] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. kern :info : [ 7.518608] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k kern :info : [ 7.525564] igb: Copyright (c) 2007-2014 Intel Corporation. kern :info : [ 7.600841] igb 0000:05:00.0: added PHC on eth0 kern :info : [ 7.605401] igb 0000:05:00.0: Intel(R) Gigabit Ethernet Network Connection kern :info : [ 7.612275] igb 0000:05:00.0: eth0: (PCIe:5.0Gb/s:Width x4) 0c:c4:7a:c4:ab:7a kern :info : [ 7.619485] igb 0000:05:00.0: eth0: PBA No: 010A00-000 kern :info : [ 7.624625] igb 0000:05:00.0: Using MSI-X interrupts. 8 rx queue(s), 8 tx queue(s) kern :debug : [ 7.632292] IOAPIC[8]: Set IRTE entry (P:1 FPD:0 Dst_Mode:0 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:0 Avail:0 Vector:A2 Dest:00000000 SID:F0FF SQ:0 SVT:1) kern :debug : [ 7.645756] IOAPIC[0]: Set routing entry (8-17 -> 0xa2 -> IRQ 17 Mode:1 Active:1 Dest:0) kern :info : [ 7.725442] igb 0000:05:00.1: added PHC on eth1 kern :info : [ 7.729978] igb 0000:05:00.1: Intel(R) Gigabit Ethernet Network Connection kern :info : [ 7.736849] igb 0000:05:00.1: eth1: (PCIe:5.0Gb/s:Width x4) 0c:c4:7a:c4:ab:7b kern :info : [ 7.744058] igb 0000:05:00.1: eth1: PBA No: 010A00-000 kern :info : [ 7.749189] igb 0000:05:00.1: Using MSI-X interrupts. 8 rx queue(s), 8 tx queue(s) kern :info : [ 7.756810] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 5.1.0-k kern :info : [ 7.764463] ixgbe: Copyright (c) 1999-2016 Intel Corporation. kern :warn : [ 7.770405] ACPI Warning: \_SB.PCI0.BR2C._PRT: Return Package has no elements (empty) (20170728/nsprepkg-130) kern :warn : [ 7.780402] pmd_set_huge: Cannot satisfy [mem 0xfbc00000-0xfbe00000] with a huge-page mapping due to MTRR override. kern :info : [ 7.968074] tsc: Refined TSC clocksource calibration: 2099.998 MHz kern :info : [ 7.974292] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1e452ea631d, max_idle_ns: 440795244572 ns kern :info : [ 8.992307] clocksource: Switched to clocksource tsc kern :info : [ 9.162498] ixgbe 0000:03:00.0: Multiqueue Enabled: Rx Queue count = 16, Tx Queue count = 16 XDP Queue count = 0 kern :info : [ 9.243690] ixgbe 0000:03:00.0: MAC: 5, PHY: 7, PBA No: 020C00-000 kern :info : [ 9.249873] ixgbe 0000:03:00.0: 0c:c4:7a:c4:ad:e6 kern :info : [ 9.308468] ixgbe 0000:03:00.0: Intel(R) 10 Gigabit Network Connection kern :warn : [ 9.315089] ACPI Warning: \_SB.PCI0.BR2C._PRT: Return Package has no elements (empty) (20170728/nsprepkg-130) kern :debug : [ 9.325058] IOAPIC[9]: Set IRTE entry (P:1 FPD:0 Dst_Mode:0 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:0 Avail:0 Vector:E4 Dest:00000000 SID:002C SQ:0 SVT:1) kern :debug : [ 9.338513] IOAPIC[1]: Set routing entry (9-12 -> 0xe4 -> IRQ 63 Mode:1 Active:1 Dest:0) kern :err : [ 9.339510] BUG: sleeping function called from invalid context at lib/ioremap.c:164 kern :err : [ 9.339510] in_atomic(): 1, irqs_disabled(): 1, pid: 105, name: kworker/0:1 kern :warn : [ 9.339510] CPU: 0 PID: 105 Comm: kworker/0:1 Tainted: G W 4.14.0-rc7-00006-gb39ab98 #1 kern :warn : [ 9.339510] Hardware name: Supermicro SYS-5018D-FN4T/X10SDV-8C-TLN4F, BIOS 1.1 03/02/2016 kern :warn : [ 9.339510] Workqueue: events work_for_cpu_fn kern :warn : [ 9.339510] Call Trace: kern :warn : [ 9.339510] kern :warn : [ 9.339510] dump_stack+0x63/0x86 kern :warn : [ 9.339510] ___might_sleep+0xf1/0x110 kern :warn : [ 9.339510] __might_sleep+0x4a/0x80 kern :warn : [ 9.339510] ioremap_page_range+0x34/0x3c0 kern :warn : [ 9.339510] ghes_copy_tofrom_phys+0x87/0x2b0 kern :warn : [ 9.339510] ghes_read_estatus+0x76/0x140 kern :warn : [ 9.339510] ghes_notify_nmi+0x83/0x1d0 kern :warn : [ 9.339510] nmi_handle+0x71/0x130 kern :warn : [ 9.339510] default_do_nmi+0x53/0x110 kern :warn : [ 9.339510] do_nmi+0xec/0x140 kern :warn : [ 9.339510] end_repeat_nmi+0x1a/0x1e kern :warn : [ 9.339510] RIP: 0010:io_serial_in+0x18/0x20 kern :warn : [ 9.339510] RSP: 0000:ffffc900010838c0 EFLAGS: 00000002 kern :warn : [ 9.339510] RAX: 0004cf2df70ed900 RBX: ffffffff824a2250 RCX: 0000000000000000 kern :warn : [ 9.339510] RDX: 00000000000002fd RSI: 0000000000000005 RDI: ffffffff824a2250 kern :warn : [ 9.339510] RBP: ffffc900010838c0 R08: 0000000000000000 R09: 0000000000000000 kern :warn : [ 9.339510] R10: ffff880259901f00 R11: 0000000082354601 R12: 000000000000270a kern :warn : [ 9.339510] R13: 0000000000000020 R14: ffffffff823546b7 R15: ffffffff824a2250 kern :warn : [ 9.339510] ? io_serial_in+0x18/0x20 kern :warn : [ 9.339510] ? io_serial_in+0x18/0x20 kern :warn : [ 9.339510] kern :warn : [ 9.339510] wait_for_xmitr+0x41/0xa0 kern :warn : [ 9.339510] serial8250_console_putchar+0x1c/0x30 kern :warn : [ 9.339510] ? wait_for_xmitr+0xa0/0xa0 kern :warn : [ 9.339510] uart_console_write+0x30/0x70 kern :warn : [ 9.339510] serial8250_console_write+0xd5/0x260 kern :warn : [ 9.339510] ? atomic_notifier_call_chain+0x21/0x30 kern :warn : [ 9.339510] ? vt_console_print+0x219/0x3c0 kern :warn : [ 9.339510] univ8250_console_write+0x28/0x30 kern :warn : [ 9.339510] console_unlock+0x3f9/0x4f0 kern :warn : [ 9.339510] vprintk_emit+0x302/0x3b0 kern :warn : [ 9.339510] vprintk_default+0x1f/0x30 kern :warn : [ 9.339510] vprintk_func+0x27/0x60 kern :warn : [ 9.339510] printk+0x43/0x4b kern :warn : [ 9.339510] mp_irqdomain_alloc+0x2c5/0x2e0 kern :warn : [ 9.339510] __irq_domain_alloc_irqs+0x13e/0x2f0 kern :warn : [ 9.339510] mp_map_pin_to_irq+0x253/0x2b0 kern :warn : [ 9.339510] mp_map_gsi_to_irq+0xa1/0xc0 kern :warn : [ 9.339510] acpi_register_gsi_ioapic+0x6a/0x150 kern :warn : [ 9.339510] acpi_register_gsi+0xf/0x20 kern :warn : [ 9.339510] acpi_pci_irq_enable+0x11c/0x2a0 kern :warn : [ 9.339510] ? pci_read_config_word+0x4a/0x60 kern :warn : [ 9.339510] ? pci_read_config_word+0x27/0x30 kern :warn : [ 9.339510] pcibios_enable_device+0x2d/0x30 kern :warn : [ 9.339510] do_pci_enable_device+0x64/0xe0 kern :warn : [ 9.339510] pci_enable_device_flags+0xc8/0x110 kern :warn : [ 9.339510] pci_enable_device_mem+0x13/0x20 kern :warn : [ 9.339510] ixgbe_probe+0x37/0x18e2 kern :warn : [ 9.339510] local_pci_probe+0x45/0xa0 kern :warn : [ 9.339510] work_for_cpu_fn+0x14/0x20 kern :warn : [ 9.339510] process_one_work+0x198/0x3e0 kern :warn : [ 9.339510] worker_thread+0x1f6/0x3e0 kern :warn : [ 9.339510] kthread+0x114/0x150 kern :warn : [ 9.339510] ? process_one_work+0x3e0/0x3e0 kern :warn : [ 9.339510] ? kthread_create_on_node+0x40/0x40 kern :warn : [ 9.339510] ? kthread_create_on_node+0x40/0x40 kern :warn : [ 9.339510] ret_from_fork+0x25/0x30 To reproduce: git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp install job.yaml # job file is attached in this email bin/lkp run job.yaml Thanks, Xiaolong