aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorMichael Lyle <mlyle@lyle.org>2018-01-08 12:21:24 -0800
committerJens Axboe <axboe@kernel.dk>2018-01-08 13:29:00 -0700
commitb1092c9af9ed88dd2fc8345d987dfb7efe7be8f0 (patch)
treee3d3078c002608eef79c0570e50703c95c3c1145 /drivers/md/bcache/request.c
parentbcache: writeback: properly order backing device IO (diff)
downloadlinux-dev-b1092c9af9ed88dd2fc8345d987dfb7efe7be8f0.tar.xz
linux-dev-b1092c9af9ed88dd2fc8345d987dfb7efe7be8f0.zip
bcache: allow quick writeback when backing idle
If the control system would wait for at least half a second, and there's been no reqs hitting the backing disk for awhile: use an alternate mode where we have at most one contiguous set of writebacks in flight at a time. (But don't otherwise delay). If front-end IO appears, it will still be quick, as it will only have to contend with one real operation in flight. But otherwise, we'll be sending data to the backing disk as quickly as it can accept it (with one op at a time). Signed-off-by: Michael Lyle <mlyle@lyle.org> Reviewed-by: Tang Junhui <tang.junhui@zte.com.cn> Acked-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 52b4ce24f9e2..ddd941056f3c 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -996,6 +996,7 @@ static blk_qc_t cached_dev_make_request(struct request_queue *q,
struct cached_dev *dc = container_of(d, struct cached_dev, disk);
int rw = bio_data_dir(bio);
+ atomic_set(&dc->backing_idle, 0);
generic_start_io_acct(q, rw, bio_sectors(bio), &d->disk->part0);
bio_set_dev(bio, dc->bdev);