diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-03 17:48:17 +0900 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-11 14:33:30 +0200 |
commit | 80a761fd33cf812f771e212139157bf8f58d4b3f (patch) | |
tree | 21ea67ad749c15f25cb8a9278fe9bd7643c0ba31 /block/blk.h | |
parent | a82afdfcb8c0df09776b6458af6b68fc58b2e87b (diff) | |
download | op-kernel-dev-80a761fd33cf812f771e212139157bf8f58d4b3f.zip op-kernel-dev-80a761fd33cf812f771e212139157bf8f58d4b3f.tar.gz |
block: implement mixed merge of different failfast requests
Failfast has characteristics from other attributes. When issuing,
executing and successuflly completing requests, failfast doesn't make
any difference. It only affects how a request is handled on failure.
Allowing requests with different failfast settings to be merged cause
normal IOs to fail prematurely while not allowing has performance
penalties as failfast is used for read aheads which are likely to be
located near in-flight or to-be-issued normal IOs.
This patch introduces the concept of 'mixed merge'. A request is a
mixed merge if it is merge of segments which require different
handling on failure. Currently the only mixable attributes are
failfast ones (or lack thereof).
When a bio with different failfast settings is added to an existing
request or requests of different failfast settings are merged, the
merged request is marked mixed. Each bio carries failfast settings
and the request always tracks failfast state of the first bio. When
the request fails, blk_rq_err_bytes() can be used to determine how
many bytes can be safely failed without crossing into an area which
requires further retrials.
This allows request merging regardless of failfast settings while
keeping the failure handling correct.
This patch only implements mixed merge but doesn't enable it. The
next one will update SCSI to make use of mixed merge.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Niel Lambrechts <niel.lambrechts@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h index 3fae6ad..5ee3d7e 100644 --- a/block/blk.h +++ b/block/blk.h @@ -104,6 +104,7 @@ int ll_front_merge_fn(struct request_queue *q, struct request *req, int attempt_back_merge(struct request_queue *q, struct request *rq); int attempt_front_merge(struct request_queue *q, struct request *rq); void blk_recalc_rq_segments(struct request *rq); +void blk_rq_set_mixed_merge(struct request *rq); void blk_queue_congestion_threshold(struct request_queue *q); |