Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'vfs-6.18-rc1.workqueue' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs workqueue updates from Christian Brauner:
"This contains various workqueue changes affecting the filesystem
layer.

Currently if a user enqueue a work item using schedule_delayed_work()
the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies
to schedule_work() that is using system_wq and queue_work(), that
makes use again of WORK_CPU_UNBOUND.

This replaces the use of system_wq and system_unbound_wq. system_wq is
a per-CPU workqueue which isn't very obvious from the name and
system_unbound_wq is to be used when locality is not required.

So this renames system_wq to system_percpu_wq, and system_unbound_wq
to system_dfl_wq.

This also adds a new WQ_PERCPU flag to allow the fs subsystem users to
explicitly request the use of per-CPU behavior. Both WQ_UNBOUND and
WQ_PERCPU flags coexist for one release cycle to allow callers to
transition their calls. WQ_UNBOUND will be removed in a next release
cycle"

* tag 'vfs-6.18-rc1.workqueue' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
fs: WQ_PERCPU added to alloc_workqueue users
fs: replace use of system_wq with system_percpu_wq
fs: replace use of system_unbound_wq with system_dfl_wq

+79 -65
+2 -2
fs/afs/callback.c
··· 42 42 list_for_each_entry(vnode, &volume->open_mmaps, cb_mmap_link) { 43 43 if (vnode->cb_v_check != atomic_read(&volume->cb_v_break)) { 44 44 afs_clear_cb_promise(vnode, afs_cb_promise_clear_vol_init_cb); 45 - queue_work(system_unbound_wq, &vnode->cb_work); 45 + queue_work(system_dfl_wq, &vnode->cb_work); 46 46 } 47 47 } 48 48 ··· 90 90 if (reason != afs_cb_break_for_deleted && 91 91 vnode->status.type == AFS_FTYPE_FILE && 92 92 atomic_read(&vnode->cb_nr_mmap)) 93 - queue_work(system_unbound_wq, &vnode->cb_work); 93 + queue_work(system_dfl_wq, &vnode->cb_work); 94 94 95 95 trace_afs_cb_break(&vnode->fid, vnode->cb_break, reason, true); 96 96 } else {
+2 -2
fs/afs/main.c
··· 169 169 170 170 printk(KERN_INFO "kAFS: Red Hat AFS client v0.1 registering.\n"); 171 171 172 - afs_wq = alloc_workqueue("afs", 0, 0); 172 + afs_wq = alloc_workqueue("afs", WQ_PERCPU, 0); 173 173 if (!afs_wq) 174 174 goto error_afs_wq; 175 175 afs_async_calls = alloc_workqueue("kafsd", WQ_MEM_RECLAIM | WQ_UNBOUND, 0); 176 176 if (!afs_async_calls) 177 177 goto error_async; 178 - afs_lock_manager = alloc_workqueue("kafs_lockd", WQ_MEM_RECLAIM, 0); 178 + afs_lock_manager = alloc_workqueue("kafs_lockd", WQ_MEM_RECLAIM | WQ_PERCPU, 0); 179 179 if (!afs_lock_manager) 180 180 goto error_lockmgr; 181 181
+1 -1
fs/afs/write.c
··· 172 172 void afs_issue_write(struct netfs_io_subrequest *subreq) 173 173 { 174 174 subreq->work.func = afs_issue_write_worker; 175 - if (!queue_work(system_unbound_wq, &subreq->work)) 175 + if (!queue_work(system_dfl_wq, &subreq->work)) 176 176 WARN_ON_ONCE(1); 177 177 } 178 178
+1 -1
fs/aio.c
··· 636 636 637 637 /* Synchronize against RCU protected table->table[] dereferences */ 638 638 INIT_RCU_WORK(&ctx->free_rwork, free_ioctx); 639 - queue_rcu_work(system_wq, &ctx->free_rwork); 639 + queue_rcu_work(system_percpu_wq, &ctx->free_rwork); 640 640 } 641 641 642 642 /*
+1 -1
fs/bcachefs/btree_write_buffer.c
··· 827 827 828 828 if (bch2_btree_write_buffer_should_flush(c) && 829 829 __enumerated_ref_tryget(&c->writes, BCH_WRITE_REF_btree_write_buffer) && 830 - !queue_work(system_unbound_wq, &c->btree_write_buffer.flush_work)) 830 + !queue_work(system_dfl_wq, &c->btree_write_buffer.flush_work)) 831 831 enumerated_ref_put(&c->writes, BCH_WRITE_REF_btree_write_buffer); 832 832 833 833 if (dst->wb == &wb->flushing)
+4 -4
fs/bcachefs/io_read.c
··· 684 684 685 685 if (bch2_err_matches(ret, BCH_ERR_data_read_retry)) { 686 686 bch2_rbio_punt(rbio, bch2_rbio_retry, 687 - RBIO_CONTEXT_UNBOUND, system_unbound_wq); 687 + RBIO_CONTEXT_UNBOUND, system_dfl_wq); 688 688 } else { 689 689 rbio = bch2_rbio_free(rbio); 690 690 ··· 921 921 bch2_rbio_error(rbio, -BCH_ERR_data_read_retry_csum_err, BLK_STS_IOERR); 922 922 goto out; 923 923 decompression_err: 924 - bch2_rbio_punt(rbio, bch2_read_decompress_err, RBIO_CONTEXT_UNBOUND, system_unbound_wq); 924 + bch2_rbio_punt(rbio, bch2_read_decompress_err, RBIO_CONTEXT_UNBOUND, system_dfl_wq); 925 925 goto out; 926 926 decrypt_err: 927 - bch2_rbio_punt(rbio, bch2_read_decrypt_err, RBIO_CONTEXT_UNBOUND, system_unbound_wq); 927 + bch2_rbio_punt(rbio, bch2_read_decrypt_err, RBIO_CONTEXT_UNBOUND, system_dfl_wq); 928 928 goto out; 929 929 } 930 930 ··· 963 963 rbio->promote || 964 964 crc_is_compressed(rbio->pick.crc) || 965 965 bch2_csum_type_is_encryption(rbio->pick.crc.csum_type)) 966 - context = RBIO_CONTEXT_UNBOUND, wq = system_unbound_wq; 966 + context = RBIO_CONTEXT_UNBOUND, wq = system_dfl_wq; 967 967 else if (rbio->pick.crc.csum_type) 968 968 context = RBIO_CONTEXT_HIGHPRI, wq = system_highpri_wq; 969 969
+1 -1
fs/bcachefs/journal_io.c
··· 1362 1362 BCH_DEV_READ_REF_journal_read)) 1363 1363 closure_call(&ca->journal.read, 1364 1364 bch2_journal_read_device, 1365 - system_unbound_wq, 1365 + system_dfl_wq, 1366 1366 &jlist.cl); 1367 1367 else 1368 1368 degraded = true;
+5 -5
fs/bcachefs/super.c
··· 801 801 if (!(c->btree_update_wq = alloc_workqueue("bcachefs", 802 802 WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM|WQ_UNBOUND, 512)) || 803 803 !(c->btree_write_complete_wq = alloc_workqueue("bcachefs_btree_write_complete", 804 - WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM, 1)) || 804 + WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM|WQ_PERCPU, 1)) || 805 805 !(c->copygc_wq = alloc_workqueue("bcachefs_copygc", 806 - WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM|WQ_CPU_INTENSIVE, 1)) || 806 + WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM|WQ_CPU_INTENSIVE|WQ_PERCPU, 1)) || 807 807 !(c->btree_write_submit_wq = alloc_workqueue("bcachefs_btree_write_sumit", 808 - WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM, 1)) || 808 + WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM|WQ_PERCPU, 1)) || 809 809 !(c->write_ref_wq = alloc_workqueue("bcachefs_write_ref", 810 - WQ_FREEZABLE, 0))) 810 + WQ_FREEZABLE|WQ_PERCPU, 0))) 811 811 return bch_err_throw(c, ENOMEM_fs_other_alloc); 812 812 813 813 int ret = bch2_fs_btree_interior_update_init(c) ?: ··· 975 975 sizeof(struct sort_iter_set); 976 976 977 977 if (!(c->btree_read_complete_wq = alloc_workqueue("bcachefs_btree_read_complete", 978 - WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM, 512)) || 978 + WQ_HIGHPRI|WQ_FREEZABLE|WQ_MEM_RECLAIM|WQ_PERCPU, 512)) || 979 979 enumerated_ref_init(&c->writes, BCH_WRITE_REF_NR, 980 980 bch2_writes_disabled) || 981 981 mempool_init_kmalloc_pool(&c->fill_iter, 1, iter_size) ||
+1 -1
fs/btrfs/block-group.c
··· 2038 2038 btrfs_reclaim_sweep(fs_info); 2039 2039 spin_lock(&fs_info->unused_bgs_lock); 2040 2040 if (!list_empty(&fs_info->reclaim_bgs)) 2041 - queue_work(system_unbound_wq, &fs_info->reclaim_bgs_work); 2041 + queue_work(system_dfl_wq, &fs_info->reclaim_bgs_work); 2042 2042 spin_unlock(&fs_info->unused_bgs_lock); 2043 2043 } 2044 2044
+1 -1
fs/btrfs/disk-io.c
··· 1958 1958 { 1959 1959 u32 max_active = fs_info->thread_pool_size; 1960 1960 unsigned int flags = WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_UNBOUND; 1961 - unsigned int ordered_flags = WQ_MEM_RECLAIM | WQ_FREEZABLE; 1961 + unsigned int ordered_flags = WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_PERCPU; 1962 1962 1963 1963 fs_info->workers = 1964 1964 btrfs_alloc_workqueue(fs_info, "worker", flags, max_active, 16);
+1 -1
fs/btrfs/extent_map.c
··· 1372 1372 if (atomic64_cmpxchg(&fs_info->em_shrinker_nr_to_scan, 0, nr_to_scan) != 0) 1373 1373 return; 1374 1374 1375 - queue_work(system_unbound_wq, &fs_info->em_shrinker_work); 1375 + queue_work(system_dfl_wq, &fs_info->em_shrinker_work); 1376 1376 } 1377 1377 1378 1378 void btrfs_init_extent_map_shrinker_work(struct btrfs_fs_info *fs_info)
+2 -2
fs/btrfs/space-info.c
··· 1830 1830 space_info->flags, 1831 1831 orig_bytes, flush, 1832 1832 "enospc"); 1833 - queue_work(system_unbound_wq, async_work); 1833 + queue_work(system_dfl_wq, async_work); 1834 1834 } 1835 1835 } else { 1836 1836 list_add_tail(&ticket.list, ··· 1847 1847 need_preemptive_reclaim(fs_info, space_info)) { 1848 1848 trace_btrfs_trigger_flush(fs_info, space_info->flags, 1849 1849 orig_bytes, flush, "preempt"); 1850 - queue_work(system_unbound_wq, 1850 + queue_work(system_dfl_wq, 1851 1851 &fs_info->preempt_reclaim_work); 1852 1852 } 1853 1853 }
+1 -1
fs/btrfs/zoned.c
··· 2521 2521 refcount_inc(&eb->refs); 2522 2522 bg->last_eb = eb; 2523 2523 INIT_WORK(&bg->zone_finish_work, btrfs_zone_finish_endio_workfn); 2524 - queue_work(system_unbound_wq, &bg->zone_finish_work); 2524 + queue_work(system_dfl_wq, &bg->zone_finish_work); 2525 2525 } 2526 2526 2527 2527 void btrfs_clear_data_reloc_bg(struct btrfs_block_group *bg)
+1 -1
fs/ceph/super.c
··· 862 862 fsc->inode_wq = alloc_workqueue("ceph-inode", WQ_UNBOUND, 0); 863 863 if (!fsc->inode_wq) 864 864 goto fail_client; 865 - fsc->cap_wq = alloc_workqueue("ceph-cap", 0, 1); 865 + fsc->cap_wq = alloc_workqueue("ceph-cap", WQ_PERCPU, 1); 866 866 if (!fsc->cap_wq) 867 867 goto fail_inode_wq; 868 868
+1 -1
fs/coredump.c
··· 635 635 636 636 /* 637 637 * Usermode helpers are childen of either 638 - * system_unbound_wq or of kthreadd. So we know that 638 + * system_dfl_wq or of kthreadd. So we know that 639 639 * we're starting off with a clean file descriptor 640 640 * table. So we should always be able to use 641 641 * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+1 -1
fs/dlm/lowcomms.c
··· 1703 1703 return -ENOMEM; 1704 1704 } 1705 1705 1706 - process_workqueue = alloc_workqueue("dlm_process", WQ_HIGHPRI | WQ_BH, 0); 1706 + process_workqueue = alloc_workqueue("dlm_process", WQ_HIGHPRI | WQ_BH | WQ_PERCPU, 0); 1707 1707 if (!process_workqueue) { 1708 1708 log_print("can't start dlm_process"); 1709 1709 destroy_workqueue(io_workqueue);
+1 -1
fs/dlm/main.c
··· 52 52 if (error) 53 53 goto out_user; 54 54 55 - dlm_wq = alloc_workqueue("dlm_wq", 0, 0); 55 + dlm_wq = alloc_workqueue("dlm_wq", WQ_PERCPU, 0); 56 56 if (!dlm_wq) { 57 57 error = -ENOMEM; 58 58 goto out_plock;
+1 -1
fs/ext4/mballoc.c
··· 3995 3995 list_splice_tail(&freed_data_list, &sbi->s_discard_list); 3996 3996 spin_unlock(&sbi->s_md_lock); 3997 3997 if (wake) 3998 - queue_work(system_unbound_wq, &sbi->s_discard_work); 3998 + queue_work(system_dfl_wq, &sbi->s_discard_work); 3999 3999 } else { 4000 4000 list_for_each_entry_safe(entry, tmp, &freed_data_list, efd_list) 4001 4001 kmem_cache_free(ext4_free_data_cachep, entry);
+2 -2
fs/fs-writeback.c
··· 1180 1180 1181 1181 static int __init cgroup_writeback_init(void) 1182 1182 { 1183 - isw_wq = alloc_workqueue("inode_switch_wbs", 0, 0); 1183 + isw_wq = alloc_workqueue("inode_switch_wbs", WQ_PERCPU, 0); 1184 1184 if (!isw_wq) 1185 1185 return -ENOMEM; 1186 1186 return 0; ··· 2442 2442 2443 2443 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); 2444 2444 if (ret == 0 && write) 2445 - mod_delayed_work(system_wq, &dirtytime_work, 0); 2445 + mod_delayed_work(system_percpu_wq, &dirtytime_work, 0); 2446 2446 return ret; 2447 2447 } 2448 2448
+1 -1
fs/fuse/dev.c
··· 119 119 goto abort_conn; 120 120 121 121 out: 122 - queue_delayed_work(system_wq, &fc->timeout.work, 122 + queue_delayed_work(system_percpu_wq, &fc->timeout.work, 123 123 fuse_timeout_timer_freq); 124 124 return; 125 125
+1 -1
fs/fuse/inode.c
··· 1273 1273 { 1274 1274 fc->timeout.req_timeout = secs_to_jiffies(timeout); 1275 1275 INIT_DELAYED_WORK(&fc->timeout.work, fuse_check_timeout); 1276 - queue_delayed_work(system_wq, &fc->timeout.work, 1276 + queue_delayed_work(system_percpu_wq, &fc->timeout.work, 1277 1277 fuse_timeout_timer_freq); 1278 1278 } 1279 1279
+3 -2
fs/gfs2/main.c
··· 151 151 152 152 error = -ENOMEM; 153 153 gfs2_recovery_wq = alloc_workqueue("gfs2_recovery", 154 - WQ_MEM_RECLAIM | WQ_FREEZABLE, 0); 154 + WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_PERCPU, 155 + 0); 155 156 if (!gfs2_recovery_wq) 156 157 goto fail_wq1; 157 158 ··· 161 160 if (!gfs2_control_wq) 162 161 goto fail_wq2; 163 162 164 - gfs2_freeze_wq = alloc_workqueue("gfs2_freeze", 0, 0); 163 + gfs2_freeze_wq = alloc_workqueue("gfs2_freeze", WQ_PERCPU, 0); 165 164 166 165 if (!gfs2_freeze_wq) 167 166 goto fail_wq3;
+4 -2
fs/gfs2/ops_fstype.c
··· 1193 1193 1194 1194 error = -ENOMEM; 1195 1195 sdp->sd_glock_wq = alloc_workqueue("gfs2-glock/%s", 1196 - WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_FREEZABLE, 0, 1196 + WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_FREEZABLE | WQ_PERCPU, 1197 + 0, 1197 1198 sdp->sd_fsname); 1198 1199 if (!sdp->sd_glock_wq) 1199 1200 goto fail_iput; 1200 1201 1201 1202 sdp->sd_delete_wq = alloc_workqueue("gfs2-delete/%s", 1202 - WQ_MEM_RECLAIM | WQ_FREEZABLE, 0, sdp->sd_fsname); 1203 + WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_PERCPU, 0, 1204 + sdp->sd_fsname); 1203 1205 if (!sdp->sd_delete_wq) 1204 1206 goto fail_glock_wq; 1205 1207
+1 -1
fs/netfs/misc.c
··· 321 321 { 322 322 if (test_bit(NETFS_RREQ_OFFLOAD_COLLECTION, &rreq->flags) && 323 323 !test_bit(NETFS_RREQ_RETRYING, &rreq->flags)) { 324 - queue_work(system_unbound_wq, &rreq->work); 324 + queue_work(system_dfl_wq, &rreq->work); 325 325 } else { 326 326 trace_netfs_rreq(rreq, netfs_rreq_trace_wake_queue); 327 327 wake_up(&rreq->waitq);
+1 -1
fs/netfs/objects.c
··· 169 169 dead = __refcount_dec_and_test(&rreq->ref, &r); 170 170 trace_netfs_rreq_ref(debug_id, r - 1, what); 171 171 if (dead) 172 - WARN_ON(!queue_work(system_unbound_wq, &rreq->cleanup_work)); 172 + WARN_ON(!queue_work(system_dfl_wq, &rreq->cleanup_work)); 173 173 } 174 174 } 175 175
+1 -1
fs/nfs/namespace.c
··· 335 335 num *= HZ; 336 336 *((int *)kp->arg) = num; 337 337 if (!list_empty(&nfs_automount_list)) 338 - mod_delayed_work(system_wq, &nfs_automount_task, num); 338 + mod_delayed_work(system_percpu_wq, &nfs_automount_task, num); 339 339 } else { 340 340 *((int *)kp->arg) = -1*HZ; 341 341 cancel_delayed_work(&nfs_automount_task);
+1 -1
fs/nfs/nfs4renewd.c
··· 122 122 timeout = 5 * HZ; 123 123 dprintk("%s: requeueing work. Lease period = %ld\n", 124 124 __func__, (timeout + HZ - 1) / HZ); 125 - mod_delayed_work(system_wq, &clp->cl_renewd, timeout); 125 + mod_delayed_work(system_percpu_wq, &clp->cl_renewd, timeout); 126 126 set_bit(NFS_CS_RENEWD, &clp->cl_res_state); 127 127 spin_unlock(&clp->cl_lock); 128 128 }
+1 -1
fs/nfsd/filecache.c
··· 113 113 nfsd_file_schedule_laundrette(void) 114 114 { 115 115 if (test_bit(NFSD_FILE_CACHE_UP, &nfsd_file_flags)) 116 - queue_delayed_work(system_unbound_wq, &nfsd_filecache_laundrette, 116 + queue_delayed_work(system_dfl_wq, &nfsd_filecache_laundrette, 117 117 NFSD_LAUNDRETTE_DELAY); 118 118 } 119 119
+2 -2
fs/notify/mark.c
··· 428 428 conn->destroy_next = connector_destroy_list; 429 429 connector_destroy_list = conn; 430 430 spin_unlock(&destroy_lock); 431 - queue_work(system_unbound_wq, &connector_reaper_work); 431 + queue_work(system_dfl_wq, &connector_reaper_work); 432 432 } 433 433 /* 434 434 * Note that we didn't update flags telling whether inode cares about ··· 439 439 spin_lock(&destroy_lock); 440 440 list_add(&mark->g_list, &destroy_list); 441 441 spin_unlock(&destroy_lock); 442 - queue_delayed_work(system_unbound_wq, &reaper_work, 442 + queue_delayed_work(system_dfl_wq, &reaper_work, 443 443 FSNOTIFY_REAPER_DELAY); 444 444 } 445 445 EXPORT_SYMBOL_GPL(fsnotify_put_mark);
+2 -1
fs/ocfs2/dlm/dlmdomain.c
··· 1876 1876 dlm_debug_init(dlm); 1877 1877 1878 1878 snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name); 1879 - dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM, 0); 1879 + dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM | WQ_PERCPU, 1880 + 0); 1880 1881 if (!dlm->dlm_worker) { 1881 1882 status = -ENOMEM; 1882 1883 mlog_errno(status);
+2 -1
fs/ocfs2/dlmfs/dlmfs.c
··· 595 595 } 596 596 cleanup_inode = 1; 597 597 598 - user_dlm_worker = alloc_workqueue("user_dlm", WQ_MEM_RECLAIM, 0); 598 + user_dlm_worker = alloc_workqueue("user_dlm", 599 + WQ_MEM_RECLAIM | WQ_PERCPU, 0); 599 600 if (!user_dlm_worker) { 600 601 status = -ENOMEM; 601 602 goto bail;
+1 -1
fs/quota/dquot.c
··· 881 881 put_releasing_dquots(dquot); 882 882 atomic_dec(&dquot->dq_count); 883 883 spin_unlock(&dq_list_lock); 884 - queue_delayed_work(system_unbound_wq, &quota_release_work, 1); 884 + queue_delayed_work(system_dfl_wq, &quota_release_work, 1); 885 885 } 886 886 EXPORT_SYMBOL(dqput); 887 887
+11 -5
fs/smb/client/cifsfs.c
··· 1895 1895 cifs_dbg(VFS, "dir_cache_timeout set to max of 65000 seconds\n"); 1896 1896 } 1897 1897 1898 - cifsiod_wq = alloc_workqueue("cifsiod", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); 1898 + cifsiod_wq = alloc_workqueue("cifsiod", 1899 + WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU, 1900 + 0); 1899 1901 if (!cifsiod_wq) { 1900 1902 rc = -ENOMEM; 1901 1903 goto out_clean_proc; ··· 1925 1923 } 1926 1924 1927 1925 cifsoplockd_wq = alloc_workqueue("cifsoplockd", 1928 - WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); 1926 + WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU, 1927 + 0); 1929 1928 if (!cifsoplockd_wq) { 1930 1929 rc = -ENOMEM; 1931 1930 goto out_destroy_fileinfo_put_wq; 1932 1931 } 1933 1932 1934 1933 deferredclose_wq = alloc_workqueue("deferredclose", 1935 - WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); 1934 + WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU, 1935 + 0); 1936 1936 if (!deferredclose_wq) { 1937 1937 rc = -ENOMEM; 1938 1938 goto out_destroy_cifsoplockd_wq; 1939 1939 } 1940 1940 1941 1941 serverclose_wq = alloc_workqueue("serverclose", 1942 - WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); 1942 + WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU, 1943 + 0); 1943 1944 if (!serverclose_wq) { 1944 1945 rc = -ENOMEM; 1945 1946 goto out_destroy_deferredclose_wq; 1946 1947 } 1947 1948 1948 1949 cfid_put_wq = alloc_workqueue("cfid_put_wq", 1949 - WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); 1950 + WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU, 1951 + 0); 1950 1952 if (!cfid_put_wq) { 1951 1953 rc = -ENOMEM; 1952 1954 goto out_destroy_serverclose_wq;
+1 -1
fs/smb/server/ksmbd_work.c
··· 78 78 79 79 int ksmbd_workqueue_init(void) 80 80 { 81 - ksmbd_wq = alloc_workqueue("ksmbd-io", 0, 0); 81 + ksmbd_wq = alloc_workqueue("ksmbd-io", WQ_PERCPU, 0); 82 82 if (!ksmbd_wq) 83 83 return -ENOMEM; 84 84 return 0;
+2 -1
fs/smb/server/transport_rdma.c
··· 2242 2242 * for lack of credits 2243 2243 */ 2244 2244 smb_direct_wq = alloc_workqueue("ksmbd-smb_direct-wq", 2245 - WQ_HIGHPRI | WQ_MEM_RECLAIM, 0); 2245 + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_PERCPU, 2246 + 0); 2246 2247 if (!smb_direct_wq) 2247 2248 return -ENOMEM; 2248 2249
+2 -1
fs/super.c
··· 2251 2251 { 2252 2252 struct workqueue_struct *old; 2253 2253 struct workqueue_struct *wq = alloc_workqueue("dio/%s", 2254 - WQ_MEM_RECLAIM, 0, 2254 + WQ_MEM_RECLAIM | WQ_PERCPU, 2255 + 0, 2255 2256 sb->s_id); 2256 2257 if (!wq) 2257 2258 return -ENOMEM;
+1 -1
fs/verity/verify.c
··· 355 355 * latency on ARM64. 356 356 */ 357 357 fsverity_read_workqueue = alloc_workqueue("fsverity_read_queue", 358 - WQ_HIGHPRI, 358 + WQ_HIGHPRI | WQ_PERCPU, 359 359 num_online_cpus()); 360 360 if (!fsverity_read_workqueue) 361 361 panic("failed to allocate fsverity_read_queue");
+1 -2
fs/xfs/xfs_log.c
··· 1489 1489 log->l_iclog->ic_prev = prev_iclog; /* re-write 1st prev ptr */ 1490 1490 1491 1491 log->l_ioend_workqueue = alloc_workqueue("xfs-log/%s", 1492 - XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM | 1493 - WQ_HIGHPRI), 1492 + XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_PERCPU), 1494 1493 0, mp->m_super->s_id); 1495 1494 if (!log->l_ioend_workqueue) 1496 1495 goto out_free_iclog;
+2 -1
fs/xfs/xfs_mru_cache.c
··· 293 293 xfs_mru_cache_init(void) 294 294 { 295 295 xfs_mru_reap_wq = alloc_workqueue("xfs_mru_cache", 296 - XFS_WQFLAGS(WQ_MEM_RECLAIM | WQ_FREEZABLE), 1); 296 + XFS_WQFLAGS(WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_PERCPU), 297 + 1); 297 298 if (!xfs_mru_reap_wq) 298 299 return -ENOMEM; 299 300 return 0;
+8 -7
fs/xfs/xfs_super.c
··· 578 578 struct xfs_mount *mp) 579 579 { 580 580 mp->m_buf_workqueue = alloc_workqueue("xfs-buf/%s", 581 - XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM), 581 + XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU), 582 582 1, mp->m_super->s_id); 583 583 if (!mp->m_buf_workqueue) 584 584 goto out; 585 585 586 586 mp->m_unwritten_workqueue = alloc_workqueue("xfs-conv/%s", 587 - XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM), 587 + XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU), 588 588 0, mp->m_super->s_id); 589 589 if (!mp->m_unwritten_workqueue) 590 590 goto out_destroy_buf; 591 591 592 592 mp->m_reclaim_workqueue = alloc_workqueue("xfs-reclaim/%s", 593 - XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM), 593 + XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU), 594 594 0, mp->m_super->s_id); 595 595 if (!mp->m_reclaim_workqueue) 596 596 goto out_destroy_unwritten; ··· 602 602 goto out_destroy_reclaim; 603 603 604 604 mp->m_inodegc_wq = alloc_workqueue("xfs-inodegc/%s", 605 - XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM), 605 + XFS_WQFLAGS(WQ_FREEZABLE | WQ_MEM_RECLAIM | WQ_PERCPU), 606 606 1, mp->m_super->s_id); 607 607 if (!mp->m_inodegc_wq) 608 608 goto out_destroy_blockgc; 609 609 610 610 mp->m_sync_workqueue = alloc_workqueue("xfs-sync/%s", 611 - XFS_WQFLAGS(WQ_FREEZABLE), 0, mp->m_super->s_id); 611 + XFS_WQFLAGS(WQ_FREEZABLE | WQ_PERCPU), 0, 612 + mp->m_super->s_id); 612 613 if (!mp->m_sync_workqueue) 613 614 goto out_destroy_inodegc; 614 615 ··· 2597 2596 * AGs in all the filesystems mounted. Hence use the default large 2598 2597 * max_active value for this workqueue. 2599 2598 */ 2600 - xfs_alloc_wq = alloc_workqueue("xfsalloc", 2601 - XFS_WQFLAGS(WQ_MEM_RECLAIM | WQ_FREEZABLE), 0); 2599 + xfs_alloc_wq = alloc_workqueue("xfsalloc", XFS_WQFLAGS(WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_PERCPU), 2600 + 0); 2602 2601 if (!xfs_alloc_wq) 2603 2602 return -ENOMEM; 2604 2603