Commit 83e759043abe9d0291f58f2427ba12bbb0a6e4f1
1 parent
28aadf5169
Exists in
master
and in
20 other branches
xfs: convert to alloc_workqueue()
Convert from create[_singlethread]_workqueue() to alloc_workqueue(). * xfsdatad_workqueue and xfsconvertd_workqueue are identity converted. Using higher concurrency limit might be useful but given the complexity of workqueue usage in xfs, proceeding cautiously seems better. * xfs_mru_reap_wq is converted to non-ordered workqueue with max concurrency of 1 as the work items don't require any specific ordering and already have proper synchronization. It seems it was singlethreaded to save worker threads, which is no longer a concern. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alex Elder <aelder@sgi.com> Cc: xfs-masters@oss.sgi.com Cc: Christoph Hellwig <hch@infradead.org>
Showing 2 changed files with 4 additions and 3 deletions Side-by-side Diff
fs/xfs/linux-2.6/xfs_buf.c
... | ... | @@ -2022,11 +2022,12 @@ |
2022 | 2022 | if (!xfslogd_workqueue) |
2023 | 2023 | goto out_free_buf_zone; |
2024 | 2024 | |
2025 | - xfsdatad_workqueue = create_workqueue("xfsdatad"); | |
2025 | + xfsdatad_workqueue = alloc_workqueue("xfsdatad", WQ_MEM_RECLAIM, 1); | |
2026 | 2026 | if (!xfsdatad_workqueue) |
2027 | 2027 | goto out_destroy_xfslogd_workqueue; |
2028 | 2028 | |
2029 | - xfsconvertd_workqueue = create_workqueue("xfsconvertd"); | |
2029 | + xfsconvertd_workqueue = alloc_workqueue("xfsconvertd", | |
2030 | + WQ_MEM_RECLAIM, 1); | |
2030 | 2031 | if (!xfsconvertd_workqueue) |
2031 | 2032 | goto out_destroy_xfsdatad_workqueue; |
2032 | 2033 |
fs/xfs/xfs_mru_cache.c
... | ... | @@ -309,7 +309,7 @@ |
309 | 309 | if (!xfs_mru_elem_zone) |
310 | 310 | goto out; |
311 | 311 | |
312 | - xfs_mru_reap_wq = create_singlethread_workqueue("xfs_mru_cache"); | |
312 | + xfs_mru_reap_wq = alloc_workqueue("xfs_mru_cache", WQ_MEM_RECLAIM, 1); | |
313 | 313 | if (!xfs_mru_reap_wq) |
314 | 314 | goto out_destroy_mru_elem_zone; |
315 | 315 |