mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-27 19:36:52 +00:00
scoutfs: clean up workqueue flags
We had gotten a bit sloppy with the workqueue flags. We needed _UNBOUND in some workqueues where we wanted concurrency by scheduling across cpus instead of waiting for the current (very long running) work on a cpu to finish. We add NON_REENTRANT out of an abundance of caution. It has gone away in modern kernels and is probably not needed here, but according to the docs we would want it so we at least document that fact by using it. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+1
-1
@@ -1371,7 +1371,7 @@ int scoutfs_data_setup(struct super_block *sb)
|
||||
INIT_WORK(&datinf->return_work,
|
||||
scoutfs_data_return_server_extents_worker);
|
||||
|
||||
datinf->workq = alloc_workqueue("scoutfs_data", 0, 1);
|
||||
datinf->workq = alloc_workqueue("scoutfs_data", WQ_UNBOUND, 1);
|
||||
if (!datinf->workq) {
|
||||
kfree(datinf);
|
||||
return -ENOMEM;
|
||||
|
||||
+2
-1
@@ -1445,7 +1445,8 @@ int scoutfs_lock_setup(struct super_block *sb)
|
||||
}
|
||||
|
||||
linfo->workq = alloc_workqueue("scoutfs_lock_work",
|
||||
WQ_UNBOUND|WQ_HIGHPRI, 0);
|
||||
WQ_NON_REENTRANT | WQ_UNBOUND |
|
||||
WQ_HIGHPRI, 0);
|
||||
if (!linfo->workq) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
||||
+2
-1
@@ -1561,7 +1561,8 @@ int scoutfs_net_setup(struct super_block *sb)
|
||||
scoutfs_tseq_tree_init(&ninf->msg_tseq_tree, net_tseq_show_msg);
|
||||
|
||||
ninf->shutdown_workq = alloc_workqueue("scoutfs_net_shutdown",
|
||||
WQ_UNBOUND, 0);
|
||||
WQ_UNBOUND | WQ_NON_REENTRANT,
|
||||
0);
|
||||
if (!ninf->shutdown_workq) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
||||
+2
-1
@@ -1339,7 +1339,8 @@ int scoutfs_server_setup(struct super_block *sb)
|
||||
INIT_LIST_HEAD(&server->pending_frees);
|
||||
INIT_LIST_HEAD(&server->clients);
|
||||
|
||||
server->wq = alloc_workqueue("scoutfs_server", WQ_NON_REENTRANT, 0);
|
||||
server->wq = alloc_workqueue("scoutfs_server",
|
||||
WQ_UNBOUND | WQ_NON_REENTRANT, 0);
|
||||
if (!server->wq) {
|
||||
kfree(server);
|
||||
return -ENOMEM;
|
||||
|
||||
+2
-1
@@ -480,7 +480,8 @@ int scoutfs_setup_trans(struct super_block *sb)
|
||||
|
||||
spin_lock_init(&tri->lock);
|
||||
|
||||
sbi->trans_write_workq = alloc_workqueue("scoutfs_trans", 0, 1);
|
||||
sbi->trans_write_workq = alloc_workqueue("scoutfs_trans",
|
||||
WQ_UNBOUND, 1);
|
||||
if (!sbi->trans_write_workq) {
|
||||
kfree(tri);
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user