diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-04-15 06:12:46 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-15 06:12:46 -0400 |
commit | 2d870722965211de072bb36b446a4df99dae07e1 (patch) | |
tree | e9b884d9969157f87e6a88a0de147af4022301e5 /block | |
parent | 40bb54d197a10fe86d73073ee8202ba2812a05fa (diff) |
cfq-iosched: tweak kick logic a bit more
We only kick the dispatch for an idling queue, if we think it's a
(somewhat) fully merged request. Also allow a kick if we have other
busy queues in the system, since we don't want to risk waiting for
a potential merge in that case. It's better to get some work done and
proceed.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index e59f2108272f..579f31822469 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1905,10 +1905,13 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1905 | * of tiny requests, because we disrupt the normal plugging | 1905 | * of tiny requests, because we disrupt the normal plugging |
1906 | * and merging. If the request is already larger than a single | 1906 | * and merging. If the request is already larger than a single |
1907 | * page, let it rip immediately. For that case we assume that | 1907 | * page, let it rip immediately. For that case we assume that |
1908 | * merging is already done. | 1908 | * merging is already done. Ditto for a busy system that |
1909 | * has other work pending, don't risk delaying until the | ||
1910 | * idle timer unplug to continue working. | ||
1909 | */ | 1911 | */ |
1910 | if (cfq_cfqq_wait_request(cfqq)) { | 1912 | if (cfq_cfqq_wait_request(cfqq)) { |
1911 | if (blk_rq_bytes(rq) > PAGE_CACHE_SIZE) { | 1913 | if (blk_rq_bytes(rq) > PAGE_CACHE_SIZE || |
1914 | cfqd->busy_queues > 1) { | ||
1912 | del_timer(&cfqd->idle_slice_timer); | 1915 | del_timer(&cfqd->idle_slice_timer); |
1913 | blk_start_queueing(cfqd->queue); | 1916 | blk_start_queueing(cfqd->queue); |
1914 | } | 1917 | } |