diff mbox series

[net-next,v3] ice: Do not use WQ_MEM_RECLAIM flag for workqueue

Message ID 20221201192456.965674-1-marcin.szycik@linux.intel.com
State Deferred
Delegated to: Anthony Nguyen
Headers show
Series [net-next,v3] ice: Do not use WQ_MEM_RECLAIM flag for workqueue | expand

Commit Message

Marcin Szycik Dec. 1, 2022, 7:24 p.m. UTC
From: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>

When both ice and the irdma driver are loaded, a warning
in check_flush_dependency is being triggered. This seems
to be because of the ice driver workqueue is allocated with
the WQ_MEM_RECLAIM flag, and the irdma one is not.

Looking at the kernel documentation, it doesn't seem like
the ice driver needs to use WQ_MEM_RECLAIM. Remove it.

Example trace:

[Thu Feb 4 07:29:18 2021] ice 0000:18:00.0: Failed to get DCB config
[Thu Feb 4 07:29:48 2021] ------------[ cut here ]------------
[Thu Feb 4 07:29:48 2021] workqueue: WQ_MEM_RECLAIM ice:ice_service_task [ice] is flushing !WQ_MEM_RECLAIM infiniband: (null)
[Thu Feb 4 07:29:48 2021] WARNING: CPU: 70 PID: 78391 at kernel/workqueue.c:2509 check_flush_dependency+0x110/0x130
[Thu Feb 4 07:29:48 2021] Modules linked in: nfsv3 nfs_acl nfs lockd grace fscache ib_isert iscsi_target_mod ib_srpt target_core_mod ib_sr p scsi_transport_srp ib_umad ib_ipoib mlx5_ib intel_rapl skx_edac nfit iTCO_wdt libnvdimm iTCO_vendor_support x86_pkg_temp_thermal intel_po werclamp coretemp kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel intel_cstate rpcrdma ipmi_ssif rdma_ucm ib_iser rdma_cm i ntel_uncore libiscsi scsi_transport_iscsi iw_cm intel_rapl_perf pcspkr joydev sg ipmi_si mei_me ioatdma ipmi_devintf mei dca i2c_i801 lpc_i ch wmi ipmi_msghandler acpi_pad acpi_power_meter sunrpc ip_tables ext4 mbcache jbd2 irdma(OE) sd_mod sr_mod cdrom ast i2c_algo_bit mlx5_cor e drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ahci ttm libahci i40e drm mlxfw libata crc32c_intel ice(OE) rv(OE)
[Thu Feb 4 07:29:48 2021] ib_uverbs ib_cm ib_core
[Thu Feb 4 07:29:48 2021] CPU: 70 PID: 78391 Comm: kworker/70:1 Kdump: loaded Tainted: G OE --------- - - 4.18.0-147.el8.x86 _64 #1
[Thu Feb 4 07:29:48 2021] Hardware name: Intel Corporation S2600WFD/S2600WFD, BIOS SE5C620.86B.02.01.0010.010620200716 01/06/2020
[Thu Feb 4 07:29:48 2021] Workqueue: ice ice_service_task [ice]
[Thu Feb 4 07:29:48 2021] RIP: 0010:check_flush_dependency+0x110/0x130
[Thu Feb 4 07:29:48 2021] Code: ff ff 48 8b 50 18 48 8d 8b b0 00 00 00 49 89 e8 48 81 c6 b0 00 00 00 48 c7 c7 e0 53 c8 86 c6 05 a6 48 2f 0 1 01 e8 8a 46 fe ff <0f> 0b e9 0a ff ff ff 80 3d 94 48 2f 01 00 75 95 e9 41 ff ff ff 90
[Thu Feb 4 07:29:48 2021] RSP: 0018:ffffbc53801af998 EFLAGS: 00010282
[Thu Feb 4 07:29:48 2021] RAX: 0000000000000000 RBX: ffff9e9119a17800 RCX: 0000000000000006
[Thu Feb 4 07:29:48 2021] RDX: 0000000000000007 RSI: 0000000000000092 RDI: ffff9e7960d16a00
[Thu Feb 4 07:29:48 2021] RBP: 0000000000000000 R08: 0000000000000ed5 R09: ffffffff87639f20
[Thu Feb 4 07:29:48 2021] R10: 0001bfae1fb444de R11: 000000006c756e28 R12: ffff9e78893d1ec0
[Thu Feb 4 07:29:48 2021] R13: ffff9e783cdc5248 R14: ffff9e794f81f818 R15: ffffbc53801af9e0
[Thu Feb 4 07:29:48 2021] FS: 0000000000000000(0000) GS:ffff9e7960d00000(0000) knlGS:0000000000000000
[Thu Feb 4 07:29:48 2021] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Thu Feb 4 07:29:48 2021] CR2: 00007fade3600000 CR3: 0000001ec080a001 CR4: 00000000007606e0
[Thu Feb 4 07:29:48 2021] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[Thu Feb 4 07:29:48 2021] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[Thu Feb 4 07:29:48 2021] PKRU: 55555554
[Thu Feb 4 07:29:48 2021] Call Trace:
[Thu Feb 4 07:29:48 2021] flush_workqueue+0x13a/0x440
[Thu Feb 4 07:29:48 2021] ib_cache_cleanup_one+0x3e/0x150 [ib_core]
[Thu Feb 4 07:29:48 2021] ? device_del+0x280/0x350
[Thu Feb 4 07:29:48 2021] ib_unregister_device+0x137/0x1f0 [ib_core]
[Thu Feb 4 07:29:48 2021] irdma_ib_unregister_device+0x45/0x80 [irdma]
[Thu Feb 4 07:29:48 2021] irdma_close+0xa7/0x360 [irdma]
[Thu Feb 4 07:29:48 2021] ice_peer_close+0x140/0x170 [ice]
[Thu Feb 4 07:29:48 2021] ice_vsi_close+0xe9/0x120 [ice]
[Thu Feb 4 07:29:48 2021] ice_dcb_ena_dis_vsi.constprop.5+0x67/0x80 [ice]
[Thu Feb 4 07:29:48 2021] ice_dcb_process_lldp_set_mib_change+0x295/0x500 [ice]
[Thu Feb 4 07:29:48 2021] __ice_clean_ctrlq+0x541/0x950 [ice]
[Thu Feb 4 07:29:48 2021] ? __switch_to_asm+0x41/0x70
[Thu Feb 4 07:29:48 2021] ? __switch_to_asm+0x35/0x70
[Thu Feb 4 07:29:48 2021] ? __switch_to_asm+0x41/0x70
[Thu Feb 4 07:29:48 2021] ice_service_task+0x244/0x1800 [ice]
[Thu Feb 4 07:29:48 2021] ? __switch_to_asm+0x41/0x70
[Thu Feb 4 07:29:48 2021] ? __switch_to+0x8c/0x480
[Thu Feb 4 07:29:48 2021] ? __switch_to_asm+0x35/0x70
[Thu Feb 4 07:29:48 2021] process_one_work+0x1a7/0x3b0
[Thu Feb 4 07:29:48 2021] worker_thread+0x30/0x390
[Thu Feb 4 07:29:48 2021] ? create_worker+0x1a0/0x1a0
[Thu Feb 4 07:29:48 2021] kthread+0x112/0x130
[Thu Feb 4 07:29:48 2021] ? kthread_flush_work_fn+0x10/0x10
[Thu Feb 4 07:29:48 2021] ret_from_fork+0x35/0x40
[Thu Feb 4 07:29:48 2021] ---[ end trace 1024c3cc70a5b4e0 ]---

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
v3: added example trace
v2: fixed From tag

 drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 69984fea7fce..d01d1073ffec 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5617,7 +5617,7 @@  static int __init ice_module_init(void)
 	pr_info("%s\n", ice_driver_string);
 	pr_info("%s\n", ice_copyright);
 
-	ice_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, KBUILD_MODNAME);
+	ice_wq = alloc_workqueue("%s", 0, 0, KBUILD_MODNAME);
 	if (!ice_wq) {
 		pr_err("Failed to create workqueue\n");
 		return -ENOMEM;