aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorGui Jianfeng <guijianfeng@cn.fujitsu.com>2010-12-17 02:57:14 -0500
committerJens Axboe <jaxboe@fusionio.com>2010-12-17 02:57:14 -0500
commit7278c9c19bd85cf33213a2e0b538a18d3ac8ad00 (patch)
treee080ada1f8cc00fef4600976f8cf489cc94d1c03 /block
parenta8adbe378b56acd5945df70753c7e8f6fe223304 (diff)
cfq-iosched: don't check cfqg in choose_service_tree()
When cfq_choose_cfqg() is called in select_queue(), there must be at least one backlogged CFQ queue waiting for dispatching, hence there must be at least one backlogged CFQ group on service tree. So we never call choose_service_tree() with cfqg == NULL. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 9b186fd6bf47..c19d015ac5a5 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2103,12 +2103,6 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
2103 unsigned group_slice; 2103 unsigned group_slice;
2104 enum wl_prio_t original_prio = cfqd->serving_prio; 2104 enum wl_prio_t original_prio = cfqd->serving_prio;
2105 2105
2106 if (!cfqg) {
2107 cfqd->serving_prio = IDLE_WORKLOAD;
2108 cfqd->workload_expires = jiffies + 1;
2109 return;
2110 }
2111
2112 /* Choose next priority. RT > BE > IDLE */ 2106 /* Choose next priority. RT > BE > IDLE */
2113 if (cfq_group_busy_queues_wl(RT_WORKLOAD, cfqd, cfqg)) 2107 if (cfq_group_busy_queues_wl(RT_WORKLOAD, cfqd, cfqg))
2114 cfqd->serving_prio = RT_WORKLOAD; 2108 cfqd->serving_prio = RT_WORKLOAD;