summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-02-19 17:02:59 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-03 18:47:55 -0800
commita2a505a069e04a095a6045ee401078b282d2c425 (patch)
treec86b2f100e7807dc314b965acca3e1d82f1b6fd7
parent5b343d688e5d33cd69786036c5cf36c6c17e29c0 (diff)
xfs: try unbound pwork queues
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r--fs/xfs/xfs_pwork.c7
-rw-r--r--fs/xfs/xfs_super.c8
2 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/xfs_pwork.c b/fs/xfs/xfs_pwork.c
index 5f1a5e575a48..c1ffbf3f7000 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_FREEZABLE | WQ_SYSFS,
+ nr_threads, tag, current->pid);
if (!pctl->wq)
return -ENOMEM;
pctl->work_fn = work_fn;
@@ -123,7 +123,6 @@ unsigned int
xfs_pwork_guess_threads(
struct xfs_mount *mp)
{
- /* pwork queues are not unbounded, so we have to abide WQ_MAX_ACTIVE. */
return min_t(unsigned int, xfs_guess_metadata_threads(mp),
- WQ_MAX_ACTIVE);
+ WQ_UNBOUND_MAX_ACTIVE);
}
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index a47467ab3fdc..f17db0ecf227 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -479,8 +479,8 @@ xfs_init_mount_workqueues(
goto out_destroy_cil;
mp->m_blockgc_workqueue = alloc_workqueue("xfs-blockgc/%s",
- WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_FREEZABLE, 0,
- mp->m_super->s_id);
+ WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_SYSFS,
+ 0, mp->m_super->s_id);
if (!mp->m_blockgc_workqueue)
goto out_destroy_reclaim;
@@ -490,8 +490,8 @@ xfs_init_mount_workqueues(
goto out_destroy_eofb;
mp->m_inactive_workqueue = alloc_workqueue("xfs-inactive/%s",
- WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_FREEZABLE, 0,
- mp->m_super->s_id);
+ WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_SYSFS,
+ 0, mp->m_super->s_id);
if (!mp->m_inactive_workqueue)
goto out_destroy_sync;