aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-12-05 03:53:21 -0500
committerBen Myers <bpm@sgi.com>2011-12-19 23:17:01 -0500
commit40d344ec5ee440596b1f3ae87556e20c7197757a (patch)
treee0f41573d782b9c93306cd888b9cd7ff66d361df /fs/xfs
parent28fb588c9bd810dec273d96e80591392f6ce1e1c (diff)
xfs: mark the xfssyncd workqueue as non-reentrant
On a system with lots of memory pressure that is stuck on synchronous inode reclaim the workqueue code will run one instance of the inode reclaim work item on every CPU. which is not what we want. Make sure to mark the xfssyncd workqueue as non-reentrant to make sure there only is one instace of each running globally. Also stop using special paramater for the workqueue; now that we guarantee each fs has only running one of each works at a time there is no need to artificially lower max_active and compensate for that by setting the WQ_CPU_INTENSIVE flag. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_super.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 88cd0c893163..5f955f42377e 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1625,12 +1625,12 @@ STATIC int __init
1625xfs_init_workqueues(void) 1625xfs_init_workqueues(void)
1626{ 1626{
1627 /* 1627 /*
1628 * max_active is set to 8 to give enough concurency to allow 1628 * We never want to the same work item to run twice, reclaiming inodes
1629 * multiple work operations on each CPU to run. This allows multiple 1629 * or idling the log is not going to get any faster by multiple CPUs
1630 * filesystems to be running sync work concurrently, and scales with 1630 * competing for ressources. Use the default large max_active value
1631 * the number of CPUs in the system. 1631 * so that even lots of filesystems can perform these task in parallel.
1632 */ 1632 */
1633 xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_CPU_INTENSIVE, 8); 1633 xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_NON_REENTRANT, 0);
1634 if (!xfs_syncd_wq) 1634 if (!xfs_syncd_wq)
1635 return -ENOMEM; 1635 return -ENOMEM;
1636 return 0; 1636 return 0;