mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
567a45e917
commit
d85c8a6f1b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user