Commit b52a8348 authored by Jens Axboe's avatar Jens Axboe

[PATCH] cfq-iosched: busy_rr fairness fix

Now that we select busy_rr for possible service, insert entries at the
back of that list instead of at the front.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent ae818a38
...@@ -501,10 +501,13 @@ static void cfq_resort_rr_list(struct cfq_queue *cfqq, int preempted) ...@@ -501,10 +501,13 @@ static void cfq_resort_rr_list(struct cfq_queue *cfqq, int preempted)
/* /*
* if queue was preempted, just add to front to be fair. busy_rr * if queue was preempted, just add to front to be fair. busy_rr
* isn't sorted. * isn't sorted, but insert at the back for fairness.
*/ */
if (preempted || list == &cfqd->busy_rr) { if (preempted || list == &cfqd->busy_rr) {
list_add(&cfqq->cfq_list, list); if (preempted)
list = list->prev;
list_add_tail(&cfqq->cfq_list, list);
return; return;
} }
......
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