summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-12-15 15:38:41 -0500
committerChris Mason <chris.mason@oracle.com>2011-12-15 15:38:41 -0500
commitd85c8a6f1bc083279215ff6e79b7c292bf3ec905 (patch)
treea816e64b9c9fa84ae3033ecf12a21a429a7301d9 /fs
parent567a45e917343c952806bb9f5c19aab0139bd519 (diff)
downloadop-kernel-dev-d85c8a6f1bc083279215ff6e79b7c292bf3ec905.zip
op-kernel-dev-d85c8a6f1bc083279215ff6e79b7c292bf3ec905.tar.gz
Btrfs: unplug every once and a while
The btrfs io submission threads can build up massive plug lists. This keeps things more reasonable so we don't hand over huge dumps of IO at once. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/volumes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 91ea57a..f4b839f 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -295,6 +295,12 @@ loop_lock:
btrfs_requeue_work(&device->work);
goto done;
}
+ /* unplug every 64 requests just for good measure */
+ if (batch_run % 64 == 0) {
+ blk_finish_plug(&plug);
+ blk_start_plug(&plug);
+ sync_pending = 0;
+ }
}
cond_resched();
OpenPOWER on IntegriCloud