]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/blk-leave-sync-timer-running
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / blk-leave-sync-timer-running
CommitLineData
2cb7cef9
BS
1From: Jens Axboe <jens.axboe@oracle.com>
2Date: Wed, 19 Nov 2008 13:38:39 +0000 (+0100)
3Subject: block: leave request timeout timer running on an empty list
4References: bnc#447249
5X-Git-Tag: next-20081124~22^2~5
6X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fsfr%2Flinux-next.git;a=commitdiff_plain;h=4fc4d9c3fc9091db5a9fc534bd1c86bb338aff9f
7
8block: leave the request timeout timer running even on an empty list
9
10For sync IO, we'll often do them serialized. This means we'll be touching
11the queue timer for every IO, as opposed to only occasionally like we
12do for queued IO. Instead of deleting the timer when the last request
13is removed, just let continue running. If a new request comes up soon
14we then don't have to readd the timer again. If no new requests arrive,
15the timer will expire without side effect later.
16
17This improves high iops sync IO by ~1%.
18
19Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
20Signed-off-by: Hannes Reinecke <hare@suse.de>
21---
22
23---
24 block/blk-core.c | 1 +
25 block/blk-timeout.c | 3 ---
26 2 files changed, 1 insertion(+), 3 deletions(-)
27
28--- a/block/blk-core.c
29+++ b/block/blk-core.c
30@@ -393,6 +393,7 @@ EXPORT_SYMBOL(blk_stop_queue);
31 void blk_sync_queue(struct request_queue *q)
32 {
33 del_timer_sync(&q->unplug_timer);
34+ del_timer_sync(&q->timeout);
35 kblockd_flush_work(&q->unplug_work);
36 }
37 EXPORT_SYMBOL(blk_sync_queue);
38--- a/block/blk-timeout.c
39+++ b/block/blk-timeout.c
40@@ -14,11 +14,7 @@
41 */
42 void blk_delete_timer(struct request *req)
43 {
44- struct request_queue *q = req->q;
45-
46 list_del_init(&req->timeout_list);
47- if (list_empty(&q->timeout_list))
48- del_timer(&q->timeout);
49 }
50
51 static void blk_rq_timed_out(struct request *req)