diff options
author | Jens Axboe <axboe@suse.de> | 2006-06-01 18:53:43 +0200 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-06-01 18:53:43 +0200 |
commit | b52a834892f17b6c54c34ab65f1fad1a9229e764 (patch) | |
tree | 0f66d6a310f108bb1f0badd3ebea3b1db0a163f6 | |
parent | ae818a38d4755ba4c16a22a8eacec859511a5393 (diff) | |
download | linux-3.10-b52a834892f17b6c54c34ab65f1fad1a9229e764.tar.gz linux-3.10-b52a834892f17b6c54c34ab65f1fad1a9229e764.tar.bz2 linux-3.10-b52a834892f17b6c54c34ab65f1fad1a9229e764.zip |
[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: Jens Axboe <axboe@suse.de>
-rw-r--r-- | block/cfq-iosched.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 85d188a30f8..8e9d84825e1 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -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; } |