FYI, we noticed the following commit:
commit: dcf3440bf7589ef75db650b9f183cdfb8d021136 ("genirq/affinity: update CPU
affinity for CPU hotplug events")
git://git.infradead.org/users/hch/block.git blk-mq-possible
in testcase: cpu-hotplug
with following parameters:
on test machine: 80 threads Intel(R) Xeon(R) CPU E7- 8870 @ 2.40GHz with 128G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
kern :err : [ 34.675200] BUG: sleeping function called from invalid context at
mm/slab.h:408
kern :err : [ 34.684985] in_atomic(): 1, irqs_disabled(): 1, pid: 43, name: cpuhp/4
kern :warn : [ 34.692322] CPU: 4 PID: 43 Comm: cpuhp/4 Not tainted
4.10.0-rc5-00278-gdcf3440 #1
kern :warn : [ 34.700730] Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS
QSSC-S4R.QCI.01.00.0030.031120111710 03/11/2011
kern :warn : [ 34.711188] Call Trace:
kern :warn : [ 34.713940] dump_stack+0x63/0x8a
kern :warn : [ 34.717668] ___might_sleep+0xd3/0x120
kern :warn : [ 34.721883] __might_sleep+0x4a/0x80
kern :warn : [ 34.725909] __kmalloc_node+0x208/0x2d0
kern :warn : [ 34.730222] ? radix_tree_lookup+0xd/0x10
kern :warn : [ 34.734728] ? alloc_cpumask_var_node+0x20/0x30
kern :warn : [ 34.739820] alloc_cpumask_var_node+0x20/0x30
kern :warn : [ 34.744719] zalloc_cpumask_var+0x14/0x20
kern :warn : [ 34.749228] irq_affinity_offline_cpu+0xde/0x1b0
kern :warn : [ 34.754415] ? irq_affinity_online_cpu+0x180/0x180
kern :warn : [ 34.759793] cpuhp_invoke_callback+0x80/0x400
kern :warn : [ 34.764692] ? smpboot_thread_fn+0x12d/0x1f0
kern :warn : [ 34.771281] ? padata_remove_cpu+0xa0/0xa0
kern :warn : [ 34.777640] ? smpboot_thread_fn+0x12d/0x1f0
kern :warn : [ 34.784183] cpuhp_down_callbacks+0x42/0x80
kern :warn : [ 34.790585] ? smpboot_thread_fn+0x34/0x1f0
kern :warn : [ 34.796945] cpuhp_thread_fun+0x88/0xe0
kern :warn : [ 34.802916] smpboot_thread_fn+0x128/0x1f0
kern :warn : [ 34.809178] kthread+0x10c/0x140
kern :warn : [ 34.814467] ? sort_range+0x30/0x30
kern :warn : [ 34.819998] ? kthread_create_on_node+0x40/0x40
kern :warn : [ 34.826658] ret_from_fork+0x2c/0x40
kern :warn : [ 34.832246] ------------[ cut here ]------------
kern :warn : [ 34.838958] WARNING: CPU: 4 PID: 43 at kernel/irq/affinity.c:165
__irq_affinity_set+0x97/0xa0
kern :warn : [ 34.852278] Modules linked in: rpcsec_gss_krb5 auth_rpcgss nfsv4
dns_resolver sr_mod cdrom sd_mod sg mgag200 ttm snd_pcm drm_kms_helper snd_timer
ata_generic snd syscopyarea intel_powerclamp pata_acpi coretemp sysfillrect sysimgblt
fb_sys_fops kvm_intel soundcore kvm irqbypass crc32c_intel ata_piix pcspkr ipmi_si drm
i7core_edac megaraid_sas libata ipmi_devintf edac_core shpchp ipmi_msghandler acpi_cpufreq
ip_tables
kern :warn : [ 34.900221] CPU: 4 PID: 43 Comm: cpuhp/4 Tainted: G W
4.10.0-rc5-00278-gdcf3440 #1
kern :warn : [ 34.911680] Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS
QSSC-S4R.QCI.01.00.0030.031120111710 03/11/2011
kern :warn : [ 34.923802] Call Trace:
kern :warn : [ 34.928251] dump_stack+0x63/0x8a
kern :warn : [ 34.933616] __warn+0xcb/0xf0
kern :warn : [ 34.938536] warn_slowpath_null+0x1d/0x20
kern :warn : [ 34.944571] __irq_affinity_set+0x97/0xa0
kern :warn : [ 34.951306] ? alloc_cpumask_var_node+0x20/0x30
kern :warn : [ 34.957947] irq_affinity_offline_cpu+0x135/0x1b0
kern :warn : [ 34.964790] ? irq_affinity_online_cpu+0x180/0x180
kern :warn : [ 34.971723] cpuhp_invoke_callback+0x80/0x400
kern :warn : [ 34.978150] ? smpboot_thread_fn+0x12d/0x1f0
kern :warn : [ 34.984478] ? padata_remove_cpu+0xa0/0xa0
kern :warn : [ 34.990629] ? smpboot_thread_fn+0x12d/0x1f0
kern :warn : [ 34.996990] cpuhp_down_callbacks+0x42/0x80
kern :warn : [ 35.003219] ? smpboot_thread_fn+0x34/0x1f0
kern :warn : [ 35.009419] cpuhp_thread_fun+0x88/0xe0
kern :warn : [ 35.015203] smpboot_thread_fn+0x128/0x1f0
kern :warn : [ 35.021256] kthread+0x10c/0x140
kern :warn : [ 35.026294] ? sort_range+0x30/0x30
kern :warn : [ 35.031622] ? kthread_create_on_node+0x40/0x40
kern :warn : [ 35.038124] ret_from_fork+0x2c/0x40
kern :warn : [ 35.043560] ---[ end trace 07f7ad6e52c696c8 ]---
To reproduce:
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/wfg/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