Commit b6508c16 authored by Vivek Goyal's avatar Vivek Goyal Committed by Jens Axboe

cfq-iosched: Do not idle if slice_idle=0

Do not idle either on cfq queue or service tree if slice_idle=0. User does
not want any queue or service tree idling. Currently even if slice_idle=0,
we were waiting for request to finish before expiring the queue and that
can lead to lower queue depths.
Acked-by: default avatarJeff Moyer <jmoyer@redhat.com>
Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 75230ff2
...@@ -1839,6 +1839,9 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq) ...@@ -1839,6 +1839,9 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq)
BUG_ON(!service_tree); BUG_ON(!service_tree);
BUG_ON(!service_tree->count); BUG_ON(!service_tree->count);
if (!cfqd->cfq_slice_idle)
return false;
/* We never do for idle class queues. */ /* We never do for idle class queues. */
if (prio == IDLE_WORKLOAD) if (prio == IDLE_WORKLOAD)
return false; return false;
...@@ -1879,7 +1882,7 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd) ...@@ -1879,7 +1882,7 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
/* /*
* idle is disabled, either manually or by past process history * idle is disabled, either manually or by past process history
*/ */
if (!cfqd->cfq_slice_idle || !cfq_should_idle(cfqd, cfqq)) if (!cfq_should_idle(cfqd, cfqq))
return; return;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment