]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
block: leave the request timeout timer running even on an empty list
authorJens Axboe <jens.axboe@oracle.com>
Wed, 19 Nov 2008 13:38:39 +0000 (14:38 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:28:42 +0000 (08:28 +0100)
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>
block/blk-core.c
block/blk-timeout.c

index 561e8a1b43a4a526e405905c69cf8f0e15a4df27..243d18b4ceb0ba312c9d8427c00cd02a6c3ae88a 100644 (file)
@@ -404,6 +404,7 @@ EXPORT_SYMBOL(blk_stop_queue);
 void blk_sync_queue(struct request_queue *q)
 {
        del_timer_sync(&q->unplug_timer);
+       del_timer_sync(&q->timeout);
        kblockd_flush_work(&q->unplug_work);
 }
 EXPORT_SYMBOL(blk_sync_queue);
index 99c3efc706b7de0e1de606b455fcbea1e4559b4c..a09535377a94c0b84a59118533f5e4ddeaa1076d 100644 (file)
@@ -73,11 +73,7 @@ ssize_t part_timeout_store(struct device *dev, struct device_attribute *attr,
  */
 void blk_delete_timer(struct request *req)
 {
-       struct request_queue *q = req->q;
-
        list_del_init(&req->timeout_list);
-       if (list_empty(&q->timeout_list))
-               del_timer(&q->timeout);
 }
 
 static void blk_rq_timed_out(struct request *req)