Thread (17 messages) 17 messages, 3 authors, 2021-01-27
STALE1979d

[PATCH 2/3] xfs: use unbounded workqueues for parallel work

From: "Darrick J. Wong" <djwong@kernel.org>
Date: 2021-01-23 18:54:09
Subsystem: filesystems (vfs and infrastructure), the rest, xfs filesystem · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Carlos Maiolino

From: Darrick J. Wong <djwong@kernel.org>

Switch the pwork workqueue to unbounded, since the current user
(quotacheck) runs lengthy scans for each work item and we don't care
about dispatching the work on a warm cpu cache or anything like that.
Also set WQ_SYSFS so that we can monitor where the wq is running.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/xfs_pwork.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_pwork.c b/fs/xfs/xfs_pwork.c
index 33fe952cdaf8..704a1c2af90c 100644
--- a/fs/xfs/xfs_pwork.c
+++ b/fs/xfs/xfs_pwork.c
@@ -70,8 +70,8 @@ xfs_pwork_init(
 #endif
 	trace_xfs_pwork_init(mp, nr_threads, current->pid);
 
-	pctl->wq = alloc_workqueue("%s-%d", WQ_FREEZABLE, nr_threads, tag,
-			current->pid);
+	pctl->wq = alloc_workqueue("%s-%d", WQ_UNBOUND | WQ_SYSFS | WQ_FREEZABLE,
+			nr_threads, tag, current->pid);
 	if (!pctl->wq)
 		return -ENOMEM;
 	pctl->work_fn = work_fn;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help