Re: [PATCH 3/3] xfs: set WQ_SYSFS on all workqueues
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-01-24 09:56:07
log->l_ioend_workqueue = alloc_workqueue("xfs-log/%s",
- WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_HIGHPRI, 0,
- mp->m_super->s_id);
+ WQ_SYSFS | WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_HIGHPRI,
+ 0, mp->m_super->s_id);This is just used for log I/O completions which are effectlively single thread. I don't see any reason to adjust the parameters here.
quoted hunk ↗ jump to hunk
if (!log->l_ioend_workqueue) goto out_free_iclog;diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c index a06661dac5be..b6dab34e361d 100644 --- a/fs/xfs/xfs_mru_cache.c +++ b/fs/xfs/xfs_mru_cache.c@@ -294,7 +294,7 @@ int xfs_mru_cache_init(void) { xfs_mru_reap_wq = alloc_workqueue("xfs_mru_cache", - WQ_MEM_RECLAIM|WQ_FREEZABLE, 1); + WQ_SYSFS | WQ_MEM_RECLAIM | WQ_FREEZABLE, 1); if (!xfs_mru_reap_wq) return -ENOMEM;
This one also hasn't ever been something we tune, so I don't think there
is a good case for enabling WQ_SYSFS.
I've stopped here. I think we should have a good use case for making
workqueues show up in sysfs based on that we:
a) have resons to adjust them ever
b) actually having them easily discoverable and documented for adminds
to tune