Merge tag 'wq-for-6.5-cleanup-ordered' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Jun 2023 23:46:06 +0000 (16:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Jun 2023 23:46:06 +0000 (16:46 -0700)
Pull ordered workqueue creation updates from Tejun Heo:
 "For historical reasons, unbound workqueues with max concurrency limit
  of 1 are considered ordered, even though the concurrency limit hasn't
  been system-wide for a long time.

  This creates ambiguity around whether ordered execution is actually
  required for correctness, which was actually confusing for e.g. btrfs
  (btrfs updates are being routed through the btrfs tree).

  There aren't that many users in the tree which use the combination and
  there are pending improvements to unbound workqueue affinity handling
  which will make inadvertent use of ordered workqueue a bigger loss.

  This clarifies the situation for most of them by updating the ones
  which require ordered execution to use alloc_ordered_workqueue().

  There are some conversions being routed through subsystem-specific
  trees and likely a few stragglers. Once they're all converted,
  workqueue can trigger a warning on unbound + @max_active==1 usages and
  eventually drop the implicit ordered behavior"

* tag 'wq-for-6.5-cleanup-ordered' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  rxrpc: Use alloc_ordered_workqueue() to create ordered workqueues
  net: qrtr: Use alloc_ordered_workqueue() to create ordered workqueues
  net: wwan: t7xx: Use alloc_ordered_workqueue() to create ordered workqueues
  dm integrity: Use alloc_ordered_workqueue() to create ordered workqueues
  media: amphion: Use alloc_ordered_workqueue() to create ordered workqueues
  scsi: NCR5380: Use default @max_active for hostdata->work_q
  media: coda: Use alloc_ordered_workqueue() to create ordered workqueues
  crypto: octeontx2: Use alloc_ordered_workqueue() to create ordered workqueues
  wifi: ath10/11/12k: Use alloc_ordered_workqueue() to create ordered workqueues
  wifi: mwifiex: Use default @max_active for workqueues
  wifi: iwlwifi: Use default @max_active for trans_pcie->rba.alloc_wq
  xen/pvcalls: Use alloc_ordered_workqueue() to create ordered workqueues
  virt: acrn: Use alloc_ordered_workqueue() to create ordered workqueues
  net: octeontx2: Use alloc_ordered_workqueue() to create ordered workqueues
  net: thunderx: Use alloc_ordered_workqueue() to create ordered workqueues
  greybus: Use alloc_ordered_workqueue() to create ordered workqueues
  powerpc, workqueue: Use alloc_ordered_workqueue() to create ordered workqueues

28 files changed:
arch/powerpc/kernel/tau_6xx.c
arch/powerpc/platforms/pseries/dlpar.c
drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
drivers/greybus/connection.c
drivers/greybus/svc.c
drivers/md/dm-integrity.c
drivers/md/dm.c
drivers/media/platform/amphion/vpu_core.c
drivers/media/platform/amphion/vpu_v4l2.c
drivers/media/platform/chips-media/coda-common.c
drivers/net/ethernet/cavium/thunder/thunder_bgx.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
drivers/net/wireless/ath/ath10k/qmi.c
drivers/net/wireless/ath/ath11k/qmi.c
drivers/net/wireless/ath/ath12k/qmi.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c
drivers/net/wireless/marvell/mwifiex/cfg80211.c
drivers/net/wireless/marvell/mwifiex/main.c
drivers/net/wwan/t7xx/t7xx_hif_cldma.c
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
drivers/scsi/NCR5380.c
drivers/virt/acrn/ioreq.c
drivers/xen/pvcalls-back.c
net/qrtr/ns.c
net/rxrpc/af_rxrpc.c

index 828d0f4106d23ffa4f20f9561773851856bb9c6c..cba6dd15de3bcc1b728a62be653c1d25bb56011f 100644 (file)
@@ -200,7 +200,7 @@ static int __init TAU_init(void)
        tau_int_enable = IS_ENABLED(CONFIG_TAU_INT) &&
                         !strcmp(cur_cpu_spec->platform, "ppc750");
 
-       tau_workq = alloc_workqueue("tau", WQ_UNBOUND, 1);
+       tau_workq = alloc_ordered_workqueue("tau", 0);
        if (!tau_workq)
                return -ENOMEM;
 
index 719c97a155edfab9f5eae927c446bd0f7dad38cf..47f8eabd1bee311b84f53b66d61e2215fb0b4a83 100644 (file)
@@ -564,8 +564,7 @@ int __init dlpar_workqueue_init(void)
        if (pseries_hp_wq)
                return 0;
 
-       pseries_hp_wq = alloc_workqueue("pseries hotplug workqueue",
-                       WQ_UNBOUND, 1);
+       pseries_hp_wq = alloc_ordered_workqueue("pseries hotplug workqueue", 0);
 
        return pseries_hp_wq ? 0 : -ENOMEM;
 }
index ddf6e913c1c45902e5d1e5bdf116f11d4c2e3b9b..30e6acfc93d9932eb99af1e42903f0d372bb327b 100644 (file)
@@ -357,9 +357,9 @@ static int cptpf_vfpf_mbox_init(struct otx2_cptpf_dev *cptpf, int num_vfs)
        u64 vfpf_mbox_base;
        int err, i;
 
-       cptpf->vfpf_mbox_wq = alloc_workqueue("cpt_vfpf_mailbox",
-                                             WQ_UNBOUND | WQ_HIGHPRI |
-                                             WQ_MEM_RECLAIM, 1);
+       cptpf->vfpf_mbox_wq =
+               alloc_ordered_workqueue("cpt_vfpf_mailbox",
+                                       WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!cptpf->vfpf_mbox_wq)
                return -ENOMEM;
 
@@ -453,9 +453,9 @@ static int cptpf_afpf_mbox_init(struct otx2_cptpf_dev *cptpf)
        resource_size_t offset;
        int err;
 
-       cptpf->afpf_mbox_wq = alloc_workqueue("cpt_afpf_mailbox",
-                                             WQ_UNBOUND | WQ_HIGHPRI |
-                                             WQ_MEM_RECLAIM, 1);
+       cptpf->afpf_mbox_wq =
+               alloc_ordered_workqueue("cpt_afpf_mailbox",
+                                       WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!cptpf->afpf_mbox_wq)
                return -ENOMEM;
 
index 392e9fee05e81c4fff89ca326d7e998542471b56..6023a7adb70c18f7f633cacd01edd2933ea797e6 100644 (file)
@@ -75,9 +75,9 @@ static int cptvf_pfvf_mbox_init(struct otx2_cptvf_dev *cptvf)
        resource_size_t offset, size;
        int ret;
 
-       cptvf->pfvf_mbox_wq = alloc_workqueue("cpt_pfvf_mailbox",
-                                             WQ_UNBOUND | WQ_HIGHPRI |
-                                             WQ_MEM_RECLAIM, 1);
+       cptvf->pfvf_mbox_wq =
+               alloc_ordered_workqueue("cpt_pfvf_mailbox",
+                                       WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!cptvf->pfvf_mbox_wq)
                return -ENOMEM;
 
index e3799a53a193066ec87e277ad643e8091e41d26d..9c88861986c8e3e859740469ecdaa2ec505a737e 100644 (file)
@@ -187,8 +187,8 @@ _gb_connection_create(struct gb_host_device *hd, int hd_cport_id,
        spin_lock_init(&connection->lock);
        INIT_LIST_HEAD(&connection->operations);
 
-       connection->wq = alloc_workqueue("%s:%d", WQ_UNBOUND, 1,
-                                        dev_name(&hd->dev), hd_cport_id);
+       connection->wq = alloc_ordered_workqueue("%s:%d", 0, dev_name(&hd->dev),
+                                                hd_cport_id);
        if (!connection->wq) {
                ret = -ENOMEM;
                goto err_free_connection;
index 16cced80867a6ad7d0bba699c985d4cc6af7082d..0d7e749174a48c65eeb0c5918f68ed75b2726613 100644 (file)
@@ -1318,7 +1318,7 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd)
        if (!svc)
                return NULL;
 
-       svc->wq = alloc_workqueue("%s:svc", WQ_UNBOUND, 1, dev_name(&hd->dev));
+       svc->wq = alloc_ordered_workqueue("%s:svc", 0, dev_name(&hd->dev));
        if (!svc->wq) {
                kfree(svc);
                return NULL;
index 31838b13ea54343c2c691448b252191dba6caed1..63ec502fcb127063ad6a311acac9a37ab3cfbbde 100644 (file)
@@ -4268,10 +4268,10 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned int argc, char **argv
        }
 
        /*
-        * If this workqueue were percpu, it would cause bio reordering
+        * If this workqueue weren't ordered, it would cause bio reordering
         * and reduced performance.
         */
-       ic->wait_wq = alloc_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+       ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM);
        if (!ic->wait_wq) {
                ti->error = "Cannot allocate workqueue";
                r = -ENOMEM;
index ae0a88defb415234a5bd80562cd848b58d745d72..fe2d4750d9c7beba54e08c6aba83f16fd9ea3723 100644 (file)
@@ -207,7 +207,7 @@ static int __init local_init(void)
        if (r)
                return r;
 
-       deferred_remove_workqueue = alloc_workqueue("kdmremove", WQ_UNBOUND, 1);
+       deferred_remove_workqueue = alloc_ordered_workqueue("kdmremove", 0);
        if (!deferred_remove_workqueue) {
                r = -ENOMEM;
                goto out_uevent_exit;
index de23627a119a0977fc346ecd1a6431651c0379c3..43d85a54268bcb4ef533bff113f17835dc69ec59 100644 (file)
@@ -254,7 +254,7 @@ static int vpu_core_register(struct device *dev, struct vpu_core *core)
        if (vpu_core_is_exist(vpu, core))
                return 0;
 
-       core->workqueue = alloc_workqueue("vpu", WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
+       core->workqueue = alloc_ordered_workqueue("vpu", WQ_MEM_RECLAIM);
        if (!core->workqueue) {
                dev_err(core->dev, "fail to alloc workqueue\n");
                return -ENOMEM;
index 6773b885597cec691326116a0362c5d91296d8b7..a48edb445eea4afd88c792cde30ab86e64b56e90 100644 (file)
@@ -740,7 +740,7 @@ int vpu_v4l2_open(struct file *file, struct vpu_inst *inst)
        inst->fh.ctrl_handler = &inst->ctrl_handler;
        file->private_data = &inst->fh;
        inst->state = VPU_CODEC_STATE_DEINIT;
-       inst->workqueue = alloc_workqueue("vpu_inst", WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
+       inst->workqueue = alloc_ordered_workqueue("vpu_inst", WQ_MEM_RECLAIM);
        if (inst->workqueue) {
                INIT_WORK(&inst->msg_work, vpu_inst_run_work);
                ret = kfifo_init(&inst->msg_fifo,
index d013ea5d9d3d239195d09e2057236d61685958d6..ac9a642ae76f720cf234d8c2bdbc9fe51ecd0303 100644 (file)
@@ -3268,7 +3268,7 @@ static int coda_probe(struct platform_device *pdev)
                                                       &dev->iram.blob);
        }
 
-       dev->workqueue = alloc_workqueue("coda", WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
+       dev->workqueue = alloc_ordered_workqueue("coda", WQ_MEM_RECLAIM);
        if (!dev->workqueue) {
                dev_err(&pdev->dev, "unable to alloc workqueue\n");
                ret = -ENOMEM;
index 7eb2ddbe9bad6b3f5586704be0a0ff8474346c20..a317feb8decb64c9263f64245b8dfeeb4efea40f 100644 (file)
@@ -1126,8 +1126,7 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
        }
 
 poll:
-       lmac->check_link = alloc_workqueue("check_link", WQ_UNBOUND |
-                                          WQ_MEM_RECLAIM, 1);
+       lmac->check_link = alloc_ordered_workqueue("check_link", WQ_MEM_RECLAIM);
        if (!lmac->check_link)
                return -ENOMEM;
        INIT_DELAYED_WORK(&lmac->dwork, bgx_poll_for_link);
index 9f673bda9dbdd5898e8c58b821cd8178e8c3bf55..0069e60afa3b024c656461ae84668d23091a707c 100644 (file)
@@ -3044,9 +3044,8 @@ static int rvu_flr_init(struct rvu *rvu)
                            cfg | BIT_ULL(22));
        }
 
-       rvu->flr_wq = alloc_workqueue("rvu_afpf_flr",
-                                     WQ_UNBOUND | WQ_HIGHPRI | WQ_MEM_RECLAIM,
-                                      1);
+       rvu->flr_wq = alloc_ordered_workqueue("rvu_afpf_flr",
+                                             WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!rvu->flr_wq)
                return -ENOMEM;
 
index 18284ad751572006d41c5b724aff5f9628d741bc..74c49795dc827b2f5c6b58132eaea7c22ea82866 100644 (file)
@@ -271,8 +271,7 @@ static int otx2_pf_flr_init(struct otx2_nic *pf, int num_vfs)
 {
        int vf;
 
-       pf->flr_wq = alloc_workqueue("otx2_pf_flr_wq",
-                                    WQ_UNBOUND | WQ_HIGHPRI, 1);
+       pf->flr_wq = alloc_ordered_workqueue("otx2_pf_flr_wq", WQ_HIGHPRI);
        if (!pf->flr_wq)
                return -ENOMEM;
 
@@ -593,9 +592,8 @@ static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)
        if (!pf->mbox_pfvf)
                return -ENOMEM;
 
-       pf->mbox_pfvf_wq = alloc_workqueue("otx2_pfvf_mailbox",
-                                          WQ_UNBOUND | WQ_HIGHPRI |
-                                          WQ_MEM_RECLAIM, 1);
+       pf->mbox_pfvf_wq = alloc_ordered_workqueue("otx2_pfvf_mailbox",
+                                                  WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!pf->mbox_pfvf_wq)
                return -ENOMEM;
 
@@ -1063,9 +1061,8 @@ static int otx2_pfaf_mbox_init(struct otx2_nic *pf)
        int err;
 
        mbox->pfvf = pf;
-       pf->mbox_wq = alloc_workqueue("otx2_pfaf_mailbox",
-                                     WQ_UNBOUND | WQ_HIGHPRI |
-                                     WQ_MEM_RECLAIM, 1);
+       pf->mbox_wq = alloc_ordered_workqueue("otx2_pfaf_mailbox",
+                                             WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!pf->mbox_wq)
                return -ENOMEM;
 
index 53366dbfbf27c3a63e8bfda0531e86a2e711389c..7baed6bb3b72d1c4694ae3bb7e5ac89b9ef95b5f 100644 (file)
@@ -297,9 +297,8 @@ static int otx2vf_vfaf_mbox_init(struct otx2_nic *vf)
        int err;
 
        mbox->pfvf = vf;
-       vf->mbox_wq = alloc_workqueue("otx2_vfaf_mailbox",
-                                     WQ_UNBOUND | WQ_HIGHPRI |
-                                     WQ_MEM_RECLAIM, 1);
+       vf->mbox_wq = alloc_ordered_workqueue("otx2_vfaf_mailbox",
+                                             WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!vf->mbox_wq)
                return -ENOMEM;
 
index 038c5903c0dc15789ae9d192ee308b74c5d796a5..52c1a3de8da60a006fdddfc6289c5a73e4bb6422 100644 (file)
@@ -1082,8 +1082,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
        if (ret)
                goto err;
 
-       qmi->event_wq = alloc_workqueue("ath10k_qmi_driver_event",
-                                       WQ_UNBOUND, 1);
+       qmi->event_wq = alloc_ordered_workqueue("ath10k_qmi_driver_event", 0);
        if (!qmi->event_wq) {
                ath10k_err(ar, "failed to allocate workqueue\n");
                ret = -EFAULT;
index ab923e24b0a9cc009a340ca4911dfe68208af4bb..26b252e62909a5cf6690beadbad780d73d35e789 100644 (file)
@@ -3256,8 +3256,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
                return ret;
        }
 
-       ab->qmi.event_wq = alloc_workqueue("ath11k_qmi_driver_event",
-                                          WQ_UNBOUND, 1);
+       ab->qmi.event_wq = alloc_ordered_workqueue("ath11k_qmi_driver_event", 0);
        if (!ab->qmi.event_wq) {
                ath11k_err(ab, "failed to allocate workqueue\n");
                return -EFAULT;
index 03ba245fbee92e85f66fbf003ad6494ecd2d26c0..0a7892b1a8f89ecc335becf7d4abe493e5df884c 100644 (file)
@@ -3056,8 +3056,7 @@ int ath12k_qmi_init_service(struct ath12k_base *ab)
                return ret;
        }
 
-       ab->qmi.event_wq = alloc_workqueue("ath12k_qmi_driver_event",
-                                          WQ_UNBOUND, 1);
+       ab->qmi.event_wq = alloc_ordered_workqueue("ath12k_qmi_driver_event", 0);
        if (!ab->qmi.event_wq) {
                ath12k_err(ab, "failed to allocate workqueue\n");
                return -EFAULT;
index b281850fbf7a99f49db21a9b6bfcf6e9f66b427e..59e14b398295a0a86370c2d2b1fdf392c31828a9 100644 (file)
@@ -3576,7 +3576,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
        init_waitqueue_head(&trans_pcie->imr_waitq);
 
        trans_pcie->rba.alloc_wq = alloc_workqueue("rb_allocator",
-                                                  WQ_HIGHPRI | WQ_UNBOUND, 1);
+                                                  WQ_HIGHPRI | WQ_UNBOUND, 0);
        if (!trans_pcie->rba.alloc_wq) {
                ret = -ENOMEM;
                goto out_free_trans;
index bcd564dc3554a80c8a37ab18abd31d24c0cbdbe0..5337ee4b6f10ce9ce5c427ca3cba6e9f0e54c860 100644 (file)
@@ -3127,7 +3127,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
        priv->dfs_cac_workqueue = alloc_workqueue("MWIFIEX_DFS_CAC%s",
                                                  WQ_HIGHPRI |
                                                  WQ_MEM_RECLAIM |
-                                                 WQ_UNBOUND, 1, name);
+                                                 WQ_UNBOUND, 0, name);
        if (!priv->dfs_cac_workqueue) {
                mwifiex_dbg(adapter, ERROR, "cannot alloc DFS CAC queue\n");
                ret = -ENOMEM;
@@ -3138,7 +3138,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
 
        priv->dfs_chan_sw_workqueue = alloc_workqueue("MWIFIEX_DFS_CHSW%s",
                                                      WQ_HIGHPRI | WQ_UNBOUND |
-                                                     WQ_MEM_RECLAIM, 1, name);
+                                                     WQ_MEM_RECLAIM, 0, name);
        if (!priv->dfs_chan_sw_workqueue) {
                mwifiex_dbg(adapter, ERROR, "cannot alloc DFS channel sw queue\n");
                ret = -ENOMEM;
index ea22a08e6c083ed7adfdb1d95fb3d2319c13b596..1cd9d20cca16eee2a0b1a3e325e83f3e0fe6f128 100644 (file)
@@ -1547,7 +1547,7 @@ mwifiex_reinit_sw(struct mwifiex_adapter *adapter)
 
        adapter->workqueue =
                alloc_workqueue("MWIFIEX_WORK_QUEUE",
-                               WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+                               WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 0);
        if (!adapter->workqueue)
                goto err_kmalloc;
 
@@ -1557,7 +1557,7 @@ mwifiex_reinit_sw(struct mwifiex_adapter *adapter)
                adapter->rx_workqueue = alloc_workqueue("MWIFIEX_RX_WORK_QUEUE",
                                                        WQ_HIGHPRI |
                                                        WQ_MEM_RECLAIM |
-                                                       WQ_UNBOUND, 1);
+                                                       WQ_UNBOUND, 0);
                if (!adapter->rx_workqueue)
                        goto err_kmalloc;
                INIT_WORK(&adapter->rx_work, mwifiex_rx_work_queue);
@@ -1702,7 +1702,7 @@ mwifiex_add_card(void *card, struct completion *fw_done,
 
        adapter->workqueue =
                alloc_workqueue("MWIFIEX_WORK_QUEUE",
-                               WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+                               WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 0);
        if (!adapter->workqueue)
                goto err_kmalloc;
 
@@ -1712,7 +1712,7 @@ mwifiex_add_card(void *card, struct completion *fw_done,
                adapter->rx_workqueue = alloc_workqueue("MWIFIEX_RX_WORK_QUEUE",
                                                        WQ_HIGHPRI |
                                                        WQ_MEM_RECLAIM |
-                                                       WQ_UNBOUND, 1);
+                                                       WQ_UNBOUND, 0);
                if (!adapter->rx_workqueue)
                        goto err_kmalloc;
 
index aec3a18d44bde61c6343d0ed16697a96c2465011..7162bf38a8c906a221fa897f30c10cc497d6f9dc 100644 (file)
@@ -1293,9 +1293,9 @@ int t7xx_cldma_init(struct cldma_ctrl *md_ctrl)
        for (i = 0; i < CLDMA_TXQ_NUM; i++) {
                md_cd_queue_struct_init(&md_ctrl->txq[i], md_ctrl, MTK_TX, i);
                md_ctrl->txq[i].worker =
-                       alloc_workqueue("md_hif%d_tx%d_worker",
-                                       WQ_UNBOUND | WQ_MEM_RECLAIM | (i ? 0 : WQ_HIGHPRI),
-                                       1, md_ctrl->hif_id, i);
+                       alloc_ordered_workqueue("md_hif%d_tx%d_worker",
+                                       WQ_MEM_RECLAIM | (i ? 0 : WQ_HIGHPRI),
+                                       md_ctrl->hif_id, i);
                if (!md_ctrl->txq[i].worker)
                        goto err_workqueue;
 
@@ -1306,9 +1306,10 @@ int t7xx_cldma_init(struct cldma_ctrl *md_ctrl)
                md_cd_queue_struct_init(&md_ctrl->rxq[i], md_ctrl, MTK_RX, i);
                INIT_WORK(&md_ctrl->rxq[i].cldma_work, t7xx_cldma_rx_done);
 
-               md_ctrl->rxq[i].worker = alloc_workqueue("md_hif%d_rx%d_worker",
-                                                        WQ_UNBOUND | WQ_MEM_RECLAIM,
-                                                        1, md_ctrl->hif_id, i);
+               md_ctrl->rxq[i].worker =
+                       alloc_ordered_workqueue("md_hif%d_rx%d_worker",
+                                               WQ_MEM_RECLAIM,
+                                               md_ctrl->hif_id, i);
                if (!md_ctrl->rxq[i].worker)
                        goto err_workqueue;
        }
index 46514208d4f9b2f63f1ffddcd293abfeb3398180..8dab025a088a25f3573aa9e92aeb3271bcb32c1c 100644 (file)
@@ -618,8 +618,9 @@ int t7xx_dpmaif_txq_init(struct dpmaif_tx_queue *txq)
                return ret;
        }
 
-       txq->worker = alloc_workqueue("md_dpmaif_tx%d_worker", WQ_UNBOUND | WQ_MEM_RECLAIM |
-                                     (txq->index ? 0 : WQ_HIGHPRI), 1, txq->index);
+       txq->worker = alloc_ordered_workqueue("md_dpmaif_tx%d_worker",
+                               WQ_MEM_RECLAIM | (txq->index ? 0 : WQ_HIGHPRI),
+                               txq->index);
        if (!txq->worker)
                return -ENOMEM;
 
index ca85bddb582b468a4573b2858d52cf5acd3c80d9..cea3a79d538e4b537a79915f06f4bc1ce7e2cf7c 100644 (file)
@@ -417,7 +417,7 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
        INIT_WORK(&hostdata->main_task, NCR5380_main);
        hostdata->work_q = alloc_workqueue("ncr5380_%d",
                                WQ_UNBOUND | WQ_MEM_RECLAIM,
-                               1, instance->host_no);
+                               0, instance->host_no);
        if (!hostdata->work_q)
                return -ENOMEM;
 
index d75ab3f66da4dcb6d0c4f19303b79e3dc6d20941..cecdc1c13af7b648a07f0e892d1ecb9f6d98b33d 100644 (file)
@@ -576,8 +576,8 @@ static void ioreq_resume(void)
 int acrn_ioreq_intr_setup(void)
 {
        acrn_setup_intr_handler(ioreq_intr_handler);
-       ioreq_wq = alloc_workqueue("ioreq_wq",
-                                  WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+       ioreq_wq = alloc_ordered_workqueue("ioreq_wq",
+                                          WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!ioreq_wq) {
                dev_err(acrn_dev.this_device, "Failed to alloc workqueue!\n");
                acrn_remove_intr_handler();
index 7beaf2c41fbbbe6bc6f3822953bab275f2db26a4..d52593466a792c966f1bb40259a447d92ab796be 100644 (file)
@@ -363,7 +363,7 @@ static struct sock_mapping *pvcalls_new_active_socket(
        map->data.in = map->bytes;
        map->data.out = map->bytes + XEN_FLEX_RING_SIZE(map->ring_order);
 
-       map->ioworker.wq = alloc_workqueue("pvcalls_io", WQ_UNBOUND, 1);
+       map->ioworker.wq = alloc_ordered_workqueue("pvcalls_io", 0);
        if (!map->ioworker.wq)
                goto out;
        atomic_set(&map->io, 1);
@@ -636,7 +636,7 @@ static int pvcalls_back_bind(struct xenbus_device *dev,
 
        INIT_WORK(&map->register_work, __pvcalls_back_accept);
        spin_lock_init(&map->copy_lock);
-       map->wq = alloc_workqueue("pvcalls_wq", WQ_UNBOUND, 1);
+       map->wq = alloc_ordered_workqueue("pvcalls_wq", 0);
        if (!map->wq) {
                ret = -ENOMEM;
                goto out;
index 0f25a386138c91af11f87d086fda5bc19a85aaf9..0f7a729f1a1fae9681ca1fd1829b331bb575e26f 100644 (file)
@@ -783,7 +783,7 @@ int qrtr_ns_init(void)
                goto err_sock;
        }
 
-       qrtr_ns.workqueue = alloc_workqueue("qrtr_ns_handler", WQ_UNBOUND, 1);
+       qrtr_ns.workqueue = alloc_ordered_workqueue("qrtr_ns_handler", 0);
        if (!qrtr_ns.workqueue) {
                ret = -ENOMEM;
                goto err_sock;
index da0b3b5157d5f343f7ffac19882e3d3a0ea26ea1..4c471fa7e09a8617687b73a9a7466e5743a65a30 100644 (file)
@@ -989,7 +989,7 @@ static int __init af_rxrpc_init(void)
                goto error_call_jar;
        }
 
-       rxrpc_workqueue = alloc_workqueue("krxrpcd", WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+       rxrpc_workqueue = alloc_ordered_workqueue("krxrpcd", WQ_HIGHPRI | WQ_MEM_RECLAIM);
        if (!rxrpc_workqueue) {
                pr_notice("Failed to allocate work queue\n");
                goto error_work_queue;