Commit e0de0206 authored by Jens Axboe's avatar Jens Axboe

[PATCH] cfq-iosched: check busy queues before deciding we are idle

For just one busy queue (like async write out), we often overlooked
that we could queue more io and decided we were idle instead. This causes
us quite a bit of performance loss.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent ba8f5bab
...@@ -878,6 +878,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd) ...@@ -878,6 +878,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd)
if (!list_empty(&cfqd->cur_rr) || cfq_get_next_prio_level(cfqd) != -1) if (!list_empty(&cfqd->cur_rr) || cfq_get_next_prio_level(cfqd) != -1)
cfqq = list_entry_cfqq(cfqd->cur_rr.next); cfqq = list_entry_cfqq(cfqd->cur_rr.next);
/*
* If no new queues are available, check if the busy list has some
* before falling back to idle io.
*/
if (!cfqq && !list_empty(&cfqd->busy_rr))
cfqq = list_entry_cfqq(cfqd->busy_rr.next);
/* /*
* if we have idle queues and no rt or be queues had pending * if we have idle queues and no rt or be queues had pending
* requests, either allow immediate service if the grace period * requests, either allow immediate service if the grace period
......
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