RE: [PATCH] workqueue: doc change for ST behavior on NUMA systems

From: Alexei Potashnik
Date: Tue Jul 18 2017 - 18:25:15 EST


Actually there are few more places in the tree that still do this.
I doubt they actually need per-NUMA node serialization:

arch/powerpc/platforms/pseries/dlpar.c:
WQ_UNBOUND, 1);
drivers/lightnvm/pblk-init.c:
WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
drivers/md/dm-integrity.c: ic->wait_wq =
alloc_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
drivers/md/dm.c: deferred_remove_workqueue =
alloc_workqueue("kdmremove", WQ_UNBOUND, 1);
drivers/media/platform/coda/coda-common.c: dev->workqueue =
alloc_workqueue("coda", WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
drivers/net/ethernet/cavium/thunder/nic_main.c:
WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
drivers/net/ethernet/intel/i40e/i40e_main.c: i40e_wq =
alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1,
drivers/net/ethernet/intel/i40evf/i40evf_main.c: i40evf_wq =
alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1,
drivers/net/wireless/intel/iwlwifi/pcie/rx.c:
WQ_HIGHPRI | WQ_UNBOUND, 1);
drivers/net/wireless/marvell/mwifiex/cfg80211.c:
WQ_UNBOUND, 1, name);
drivers/net/wireless/marvell/mwifiex/main.c:
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
drivers/net/wireless/marvell/mwifiex/main.c:
WQ_UNBOUND, 1);
drivers/net/wireless/marvell/mwifiex/main.c:
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
drivers/net/wireless/marvell/mwifiex/main.c:
WQ_UNBOUND, 1);
drivers/staging/greybus/connection.c: connection->wq =
alloc_workqueue("%s:%d", WQ_UNBOUND, 1,
drivers/staging/greybus/svc.c: svc->wq = alloc_workqueue("%s:svc",
WQ_UNBOUND, 1, dev_name(&hd->dev));
drivers/target/target_core_device.c: dev->tmr_wq =
alloc_workqueue("tmr-%s", WQ_MEM_RECLAIM | WQ_UNBOUND, 1,
fs/dlm/lowcomms.c: WQ_UNBOUND |
WQ_MEM_RECLAIM, 1);
fs/dlm/lowcomms.c: WQ_UNBOUND |
WQ_MEM_RECLAIM, 1);
fs/ext4/super.c: alloc_workqueue("ext4-rsv-conversion",
WQ_MEM_RECLAIM | WQ_UNBOUND, 1);

-----Original Message-----
From: Alexei Potashnik [mailto:alexei@xxxxxxxxxxxxxxx]
Sent: Tuesday, July 18, 2017 2:33 PM
To: 'Christoph Hellwig' <hch@xxxxxxxxxxxxx>
Cc: 'tj@xxxxxxxxxx' <tj@xxxxxxxxxx>; 'linux-kernel@xxxxxxxxxxxxxxx'
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH] workqueue: doc change for ST behavior on NUMA systems

target has a bug in TMR handling.

dev->tmr_wq = alloc_workqueue("tmr-%s", WQ_MEM_RECLAIM |
WQ_UNBOUND, 1,
dev->transport->name);

LUN_RESET can race with TASK_ABORT in different sessions.
Will send a patch to target list.

-----Original Message-----
From: Christoph Hellwig [mailto:hch@xxxxxxxxxxxxx]
Sent: Tuesday, July 18, 2017 12:18 PM
To: Alexei Potashnik <alexei@xxxxxxxxxxxxxxx>
Cc: tj@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] workqueue: doc change for ST behavior on NUMA systems

On Tue, Jul 18, 2017 at 11:12:53AM -0700, Alexei Potashnik wrote:
> NUMA rework of workqueue made the combination of max_active of 1 and
> WQ_UNBOUND insufficient to guarantee ST behavior system wide.
>
> alloc_ordered_queue should now be used instead.

Eww. And how many existing users might be broken by that?