aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-01-28 07:19:43 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-01-28 07:19:43 -0500
commitfebffd61816ef6d4f84189468c1d47f1df55921e (patch)
tree96654c4e1d41bd3f4d5f685eee7dd0a3505e7092 /block/cfq-iosched.c
parent0871714e08fed7ba66cadad11b2e4f85a9dc9b96 (diff)
cfq-iosched: kill some big inlines
Use of inlines were a bit over the top, trim them down a bit. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 8fe1a0ddb511..f28d1fb30608 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -534,8 +534,7 @@ static void cfq_resort_rr_list(struct cfq_data *cfqd, struct cfq_queue *cfqq)
534 * add to busy list of queues for service, trying to be fair in ordering 534 * add to busy list of queues for service, trying to be fair in ordering
535 * the pending list according to last request service 535 * the pending list according to last request service
536 */ 536 */
537static inline void 537static void cfq_add_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
538cfq_add_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
539{ 538{
540 BUG_ON(cfq_cfqq_on_rr(cfqq)); 539 BUG_ON(cfq_cfqq_on_rr(cfqq));
541 cfq_mark_cfqq_on_rr(cfqq); 540 cfq_mark_cfqq_on_rr(cfqq);
@@ -548,8 +547,7 @@ cfq_add_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
548 * Called when the cfqq no longer has requests pending, remove it from 547 * Called when the cfqq no longer has requests pending, remove it from
549 * the service tree. 548 * the service tree.
550 */ 549 */
551static inline void 550static void cfq_del_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
552cfq_del_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
553{ 551{
554 BUG_ON(!cfq_cfqq_on_rr(cfqq)); 552 BUG_ON(!cfq_cfqq_on_rr(cfqq));
555 cfq_clear_cfqq_on_rr(cfqq); 553 cfq_clear_cfqq_on_rr(cfqq);
@@ -564,7 +562,7 @@ cfq_del_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
564/* 562/*
565 * rb tree support functions 563 * rb tree support functions
566 */ 564 */
567static inline void cfq_del_rq_rb(struct request *rq) 565static void cfq_del_rq_rb(struct request *rq)
568{ 566{
569 struct cfq_queue *cfqq = RQ_CFQQ(rq); 567 struct cfq_queue *cfqq = RQ_CFQQ(rq);
570 struct cfq_data *cfqd = cfqq->cfqd; 568 struct cfq_data *cfqd = cfqq->cfqd;
@@ -604,8 +602,7 @@ static void cfq_add_rq_rb(struct request *rq)
604 BUG_ON(!cfqq->next_rq); 602 BUG_ON(!cfqq->next_rq);
605} 603}
606 604
607static inline void 605static void cfq_reposition_rq_rb(struct cfq_queue *cfqq, struct request *rq)
608cfq_reposition_rq_rb(struct cfq_queue *cfqq, struct request *rq)
609{ 606{
610 elv_rb_del(&cfqq->sort_list, rq); 607 elv_rb_del(&cfqq->sort_list, rq);
611 cfqq->queued[rq_is_sync(rq)]--; 608 cfqq->queued[rq_is_sync(rq)]--;
@@ -742,8 +739,8 @@ static int cfq_allow_merge(struct request_queue *q, struct request *rq,
742 return 0; 739 return 0;
743} 740}
744 741
745static inline void 742static void __cfq_set_active_queue(struct cfq_data *cfqd,
746__cfq_set_active_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq) 743 struct cfq_queue *cfqq)
747{ 744{
748 if (cfqq) { 745 if (cfqq) {
749 cfqq->slice_end = 0; 746 cfqq->slice_end = 0;
@@ -913,7 +910,7 @@ static void cfq_dispatch_insert(struct request_queue *q, struct request *rq)
913/* 910/*
914 * return expired entry, or NULL to just start from scratch in rbtree 911 * return expired entry, or NULL to just start from scratch in rbtree
915 */ 912 */
916static inline struct request *cfq_check_fifo(struct cfq_queue *cfqq) 913static struct request *cfq_check_fifo(struct cfq_queue *cfqq)
917{ 914{
918 struct cfq_data *cfqd = cfqq->cfqd; 915 struct cfq_data *cfqd = cfqq->cfqd;
919 struct request *rq; 916 struct request *rq;
@@ -1042,7 +1039,7 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1042 return dispatched; 1039 return dispatched;
1043} 1040}
1044 1041
1045static inline int __cfq_forced_dispatch_cfqq(struct cfq_queue *cfqq) 1042static int __cfq_forced_dispatch_cfqq(struct cfq_queue *cfqq)
1046{ 1043{
1047 int dispatched = 0; 1044 int dispatched = 0;
1048 1045
@@ -1330,8 +1327,7 @@ static void cfq_init_prio_data(struct cfq_queue *cfqq, struct io_context *ioc)
1330 cfq_clear_cfqq_prio_changed(cfqq); 1327 cfq_clear_cfqq_prio_changed(cfqq);
1331} 1328}
1332 1329
1333static inline void changed_ioprio(struct io_context *ioc, 1330static void changed_ioprio(struct io_context *ioc, struct cfq_io_context *cic)
1334 struct cfq_io_context *cic)
1335{ 1331{
1336 struct cfq_data *cfqd = cic->key; 1332 struct cfq_data *cfqd = cic->key;
1337 struct cfq_queue *cfqq; 1333 struct cfq_queue *cfqq;
@@ -1547,9 +1543,8 @@ cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc)
1547 * the process specific cfq io context when entered from the block layer. 1543 * the process specific cfq io context when entered from the block layer.
1548 * Also adds the cic to a per-cfqd list, used when this queue is removed. 1544 * Also adds the cic to a per-cfqd list, used when this queue is removed.
1549 */ 1545 */
1550static inline int 1546static int cfq_cic_link(struct cfq_data *cfqd, struct io_context *ioc,
1551cfq_cic_link(struct cfq_data *cfqd, struct io_context *ioc, 1547 struct cfq_io_context *cic, gfp_t gfp_mask)
1552 struct cfq_io_context *cic, gfp_t gfp_mask)
1553{ 1548{
1554 unsigned long flags; 1549 unsigned long flags;
1555 int ret; 1550 int ret;