aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-10-20 15:45:37 -0400
committerChris Mason <chris.mason@oracle.com>2011-11-06 03:03:47 -0500
commitcd354ad613a393424f85333ceed6b15e07fb94ae (patch)
tree98261d8cc0a0f3808fd34037629a92d31a670b19 /fs/btrfs
parentdff51cd1c60856c28f5d22a571294c2b70b6b322 (diff)
Btrfs: don't wait as long for more batches during SSD log commit
When we're doing log commits, we try to wait for more writers to come in and make the commit bigger. This helps improve performance on rotating disks, but on SSDs it adds latencies. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/tree-log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 786639fca06..310ab22cfe5 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2013,10 +2013,10 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
2013 /* wait for previous tree log sync to complete */ 2013 /* wait for previous tree log sync to complete */
2014 if (atomic_read(&root->log_commit[(index1 + 1) % 2])) 2014 if (atomic_read(&root->log_commit[(index1 + 1) % 2]))
2015 wait_log_commit(trans, root, root->log_transid - 1); 2015 wait_log_commit(trans, root, root->log_transid - 1);
2016
2017 while (1) { 2016 while (1) {
2018 unsigned long batch = root->log_batch; 2017 unsigned long batch = root->log_batch;
2019 if (root->log_multiple_pids) { 2018 /* when we're on an ssd, just kick the log commit out */
2019 if (!btrfs_test_opt(root, SSD) && root->log_multiple_pids) {
2020 mutex_unlock(&root->log_mutex); 2020 mutex_unlock(&root->log_mutex);
2021 schedule_timeout_uninterruptible(1); 2021 schedule_timeout_uninterruptible(1);
2022 mutex_lock(&root->log_mutex); 2022 mutex_lock(&root->log_mutex);