aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-timeout.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-11-19 08:38:39 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-12-29 02:28:42 -0500
commit70ed28b92a786f44750ab64117b03d126dd14656 (patch)
tree03e84c48c262b380fbcccb21f55ff979aaeb4e77 /block/blk-timeout.c
parent65d3618ccfe686e8d7b3f01a838d0578182406df (diff)
block: leave the request timeout timer running even on an empty list
For sync IO, we'll often do them serialized. This means we'll be touching the queue timer for every IO, as opposed to only occasionally like we do for queued IO. Instead of deleting the timer when the last request is removed, just let continue running. If a new request comes up soon we then don't have to readd the timer again. If no new requests arrive, the timer will expire without side effect later. This improves high iops sync IO by ~1%. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r--block/blk-timeout.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 99c3efc706b7..a09535377a94 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -73,11 +73,7 @@ ssize_t part_timeout_store(struct device *dev, struct device_attribute *attr,
73 */ 73 */
74void blk_delete_timer(struct request *req) 74void blk_delete_timer(struct request *req)
75{ 75{
76 struct request_queue *q = req->q;
77
78 list_del_init(&req->timeout_list); 76 list_del_init(&req->timeout_list);
79 if (list_empty(&q->timeout_list))
80 del_timer(&q->timeout);
81} 77}
82 78
83static void blk_rq_timed_out(struct request *req) 79static void blk_rq_timed_out(struct request *req)