|
@@ -38,9 +38,13 @@ static const u64 cfq_target_latency = (u64)NSEC_PER_SEC * 3/10; /* 300 ms */
|
|
static const int cfq_hist_divisor = 4;
|
|
static const int cfq_hist_divisor = 4;
|
|
|
|
|
|
/*
|
|
/*
|
|
- * offset from end of service tree
|
|
|
|
|
|
+ * offset from end of queue service tree for idle class
|
|
*/
|
|
*/
|
|
#define CFQ_IDLE_DELAY (NSEC_PER_SEC / 5)
|
|
#define CFQ_IDLE_DELAY (NSEC_PER_SEC / 5)
|
|
|
|
+/* offset from end of group service tree under time slice mode */
|
|
|
|
+#define CFQ_SLICE_MODE_GROUP_DELAY (NSEC_PER_SEC / 5)
|
|
|
|
+/* offset from end of group service under IOPS mode */
|
|
|
|
+#define CFQ_IOPS_MODE_GROUP_DELAY (HZ / 5)
|
|
|
|
|
|
/*
|
|
/*
|
|
* below this threshold, we consider thinktime immediate
|
|
* below this threshold, we consider thinktime immediate
|
|
@@ -1362,6 +1366,14 @@ cfq_group_service_tree_add(struct cfq_rb_root *st, struct cfq_group *cfqg)
|
|
cfqg->vfraction = max_t(unsigned, vfr, 1);
|
|
cfqg->vfraction = max_t(unsigned, vfr, 1);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline u64 cfq_get_cfqg_vdisktime_delay(struct cfq_data *cfqd)
|
|
|
|
+{
|
|
|
|
+ if (!iops_mode(cfqd))
|
|
|
|
+ return CFQ_SLICE_MODE_GROUP_DELAY;
|
|
|
|
+ else
|
|
|
|
+ return CFQ_IOPS_MODE_GROUP_DELAY;
|
|
|
|
+}
|
|
|
|
+
|
|
static void
|
|
static void
|
|
cfq_group_notify_queue_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
|
|
cfq_group_notify_queue_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
|
|
{
|
|
{
|
|
@@ -1381,7 +1393,8 @@ cfq_group_notify_queue_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
|
|
n = rb_last(&st->rb);
|
|
n = rb_last(&st->rb);
|
|
if (n) {
|
|
if (n) {
|
|
__cfqg = rb_entry_cfqg(n);
|
|
__cfqg = rb_entry_cfqg(n);
|
|
- cfqg->vdisktime = __cfqg->vdisktime + CFQ_IDLE_DELAY;
|
|
|
|
|
|
+ cfqg->vdisktime = __cfqg->vdisktime +
|
|
|
|
+ cfq_get_cfqg_vdisktime_delay(cfqd);
|
|
} else
|
|
} else
|
|
cfqg->vdisktime = st->min_vdisktime;
|
|
cfqg->vdisktime = st->min_vdisktime;
|
|
cfq_group_service_tree_add(st, cfqg);
|
|
cfq_group_service_tree_add(st, cfqg);
|