]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/blk-leave-sync-timer-running
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / blk-leave-sync-timer-running
1 From: Jens Axboe <jens.axboe@oracle.com>
2 Date: Wed, 19 Nov 2008 13:38:39 +0000 (+0100)
3 Subject: block: leave request timeout timer running on an empty list
4 References: bnc#447249
5 X-Git-Tag: next-20081124~22^2~5
6 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fsfr%2Flinux-next.git;a=commitdiff_plain;h=4fc4d9c3fc9091db5a9fc534bd1c86bb338aff9f
7
8 block: leave the request timeout timer running even on an empty list
9
10 For sync IO, we'll often do them serialized. This means we'll be touching
11 the queue timer for every IO, as opposed to only occasionally like we
12 do for queued IO. Instead of deleting the timer when the last request
13 is removed, just let continue running. If a new request comes up soon
14 we then don't have to readd the timer again. If no new requests arrive,
15 the timer will expire without side effect later.
16
17 This improves high iops sync IO by ~1%.
18
19 Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
20 Signed-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)