1
0
Fork 0

cfq-iosched: algebraic simplification in cfq_prio_to_maxrq()

Simplify the calculation in cfq_prio_to_maxrq(), plus replace CFQ_PRIO_LISTS to
IOPRIO_BE_NR since they are the same and IOPRIO_BE_NR looks more reasonable in
this context IMHO.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
hifive-unleashed-5.1
Namhyung Kim 2011-05-24 10:23:21 +02:00 committed by Jens Axboe
parent 4cbadbd16e
commit b9f8ce0599
1 changed files with 1 additions and 1 deletions

View File

@ -2102,7 +2102,7 @@ cfq_prio_to_maxrq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
WARN_ON(cfqq->ioprio >= IOPRIO_BE_NR);
return 2 * (base_rq + base_rq * (CFQ_PRIO_LISTS - 1 - cfqq->ioprio));
return 2 * base_rq * (IOPRIO_BE_NR - cfqq->ioprio);
}
/*