Skip to content

Commit

Permalink
[PATCH] cfq-iosched: busy_rr fairness fix
Browse files Browse the repository at this point in the history
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: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Jun 1, 2006
1 parent ae818a3 commit b52a834
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* isn't sorted.
* isn't sorted, but insert at the back for fairness.
*/
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;
}

Expand Down

0 comments on commit b52a834

Please sign in to comment.