public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] cfq-iosched: algebraic simplification in cfq_prio_to_maxrq()
@ 2011-05-24  3:18 Namhyung Kim
  2011-05-24  3:18 ` [PATCH 2/4] cfq-iosched: reduce bit operations in cfq_choose_req() Namhyung Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Namhyung Kim @ 2011-05-24  3:18 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

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>
---
 block/cfq-iosched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index ab7a9e6a9b1c..151a050e692c 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2029,7 +2029,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);
 }
 
 /*
-- 
1.7.5.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-25  2:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24  3:18 [PATCH 1/4] cfq-iosched: algebraic simplification in cfq_prio_to_maxrq() Namhyung Kim
2011-05-24  3:18 ` [PATCH 2/4] cfq-iosched: reduce bit operations in cfq_choose_req() Namhyung Kim
2011-05-24 17:34   ` Justin TerAvest
2011-05-25  2:34     ` Namhyung Kim
2011-05-24  3:18 ` [PATCH 3/4] cfq-iosched: remove unused 'group_changed' in cfq_service_tree_add() Namhyung Kim
2011-05-24 17:32   ` Justin TerAvest
2011-05-24  3:18 ` [PATCH 4/4] cfq-iosched: free cic_index if cfqd allocation fails Namhyung Kim
2011-05-24  8:13 ` [PATCH 1/4] cfq-iosched: algebraic simplification in cfq_prio_to_maxrq() Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox