Commit 9ede209e authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

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: default avatarJens Axboe <jens.axboe@oracle.com>
parent 28f95cbc
...@@ -1057,6 +1057,14 @@ cfq_dispatch_requests(request_queue_t *q, int force) ...@@ -1057,6 +1057,14 @@ cfq_dispatch_requests(request_queue_t *q, int force)
if (prev_cfqq == cfqq) if (prev_cfqq == cfqq)
break; 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_must_dispatch(cfqq);
cfq_clear_cfqq_wait_request(cfqq); cfq_clear_cfqq_wait_request(cfqq);
del_timer(&cfqd->idle_slice_timer); del_timer(&cfqd->idle_slice_timer);
...@@ -1066,14 +1074,6 @@ cfq_dispatch_requests(request_queue_t *q, int force) ...@@ -1066,14 +1074,6 @@ cfq_dispatch_requests(request_queue_t *q, int force)
max_dispatch = 1; max_dispatch = 1;
dispatched += __cfq_dispatch_requests(cfqd, cfqq, max_dispatch); 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; prev_cfqq = cfqq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment