aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-01-19 12:11:44 +1100
committerJens Axboe <axboe@carl.home.kernel.dk>2007-02-11 23:14:45 +0100
commit9ede209e83693cf3f6b64f61ab4b65f2f809cb50 (patch)
treea91ad6e7fd1b8589ecf4c8e5e027a397d89ccd6f /block
parent28f95cbc3ec01f2c7d248e1a4a384f37e9c2ab16 (diff)
downloadmrst-s0i3-test-9ede209e83693cf3f6b64f61ab4b65f2f809cb50.tar.gz
mrst-s0i3-test-9ede209e83693cf3f6b64f61ab4b65f2f809cb50.tar.xz
mrst-s0i3-test-9ede209e83693cf3f6b64f61ab4b65f2f809cb50.zip
cfq-iosched: improve continue or break logic in cfq_dispatch
This improves performance considerably for sync requests when you have command queuing enabled. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 6aa5523f514..b6491c020f2 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1057,6 +1057,14 @@ cfq_dispatch_requests(request_queue_t *q, int force)
if (prev_cfqq == cfqq)
break;
+ /*
+ * So we have dispatched before in this round, if the
+ * next queue has idling enabled (must be sync), don't
+ * allow it service until the previous have continued.
+ */
+ if (cfqd->rq_in_driver && cfq_cfqq_idle_window(cfqq))
+ break;
+
cfq_clear_cfqq_must_dispatch(cfqq);
cfq_clear_cfqq_wait_request(cfqq);
del_timer(&cfqd->idle_slice_timer);
@@ -1066,14 +1074,6 @@ cfq_dispatch_requests(request_queue_t *q, int force)
max_dispatch = 1;
dispatched += __cfq_dispatch_requests(cfqd, cfqq, max_dispatch);
-
- /*
- * If the dispatch cfqq has idling enabled and is still
- * the active queue, break out.
- */
- if (cfq_cfqq_idle_window(cfqq) && cfqd->active_queue)
- break;
-
prev_cfqq = cfqq;
}