Skip to content

Commit

Permalink
Revert "cfq: Make use of service count to estimate the rb_key offset"
Browse files Browse the repository at this point in the history
This reverts commit 3586e91.

Corrado Zoccolo <czoccolo@gmail.com> correctly points out, that we need
consistency of rb_key offset across groups. This means we cannot properly
use the per-service_tree service count. Revert this change.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Nov 30, 2009
1 parent 8e55063 commit 464191c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,11 @@ cfq_find_next_rq(struct cfq_data *cfqd, struct cfq_queue *cfqq,
static unsigned long cfq_slice_offset(struct cfq_data *cfqd,
struct cfq_queue *cfqq)
{
struct cfq_rb_root *service_tree;

service_tree = service_tree_for(cfqq_prio(cfqq), cfqq_type(cfqq), cfqd);

/*
* just an approximation, should be ok.
*/
return service_tree->count * (cfq_prio_slice(cfqd, 1, 0) -
cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio));
return (cfqd->busy_queues - 1) * (cfq_prio_slice(cfqd, 1, 0) -
cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio));
}

/*
Expand Down

0 comments on commit 464191c

Please sign in to comment.