Signed-off-by: Shaohua Li <shaoh...@intel.com>
---
block/cfq-iosched.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Index: linux/block/cfq-iosched.c
===================================================================
--- linux.orig/block/cfq-iosched.c 2010-11-08 08:43:51.000000000 +0800
+++ linux/block/cfq-iosched.c 2010-11-08 08:49:52.000000000 +0800
@@ -2293,6 +2293,17 @@ static struct cfq_queue *cfq_select_queu
goto keep_queue;
}
+ /*
+ * This is a deep seek queue, but the device is much faster than
+ * the queue can deliver, don't idle
+ **/
+ if (CFQQ_SEEKY(cfqq) && cfq_cfqq_idle_window(cfqq) &&
+ (cfq_cfqq_slice_new(cfqq) ||
+ (cfqq->slice_end - jiffies > jiffies - cfqq->slice_start))) {
+ cfq_clear_cfqq_deep(cfqq);
+ cfq_clear_cfqq_idle_window(cfqq);
+ }
+
if (cfqq->dispatched && cfq_should_idle(cfqd, cfqq)) {
cfqq = NULL;
goto keep_queue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hi Shaohua,
So looks like you are trying to cut down queue idling in the case when
device is fast and idling hurts. That's a noble goal, just that detetction
of this condition only for deep queues does not seem to cover lots of
cases. Manually one can set slice_idle=0 to handle this situation.
What about if you have lots of sequential queues (not deep) and they all
will still idle.
Secondly, what if driver is just buffering lots of requests in its device
queue and not necessarily device is processing the reuqests faster.
So I think it is a good idea to cut down on idling if we can find that
underlying device is fast and idling on queue might hurt more. But
discovering this only using deep queues does not sound very appleaing to
me. This is help only a particular workload which is driving deep queues.
So if there was a generic mechanism to tackle this, that would be much
better.
Vivek
That is not a valid concern, a driver should never extract more than it
can process (pretty much) immediately.
> So I think it is a good idea to cut down on idling if we can find that
> underlying device is fast and idling on queue might hurt more. But
> discovering this only using deep queues does not sound very appleaing to
> me. This is help only a particular workload which is driving deep queues.
> So if there was a generic mechanism to tackle this, that would be much
> better.
Agree, we could use better metrics for this.
--
Jens Axboe
Thanks,
Shaohua
Do you have a real workload for this case or it is just one of the synthetic
workload simulated using fio?
Vivek