All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]cfq-iosched: make nonrot check logic consistent
@ 2009-11-11  6:15 Shaohua Li
  0 siblings, 0 replies; 5+ messages in thread
From: Shaohua Li @ 2009-11-11  6:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: jens.axboe

cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same
thing should be done at cfq_select_queue() too, otherwise we will still see
idle window. This makes the nonrot check logic consistent in cfq.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 block/cfq-iosched.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/block/cfq-iosched.c
===================================================================
--- linux.orig/block/cfq-iosched.c	2009-11-11 13:44:00.000000000 +0800
+++ linux/block/cfq-iosched.c	2009-11-11 13:45:33.000000000 +0800
@@ -1215,7 +1215,8 @@ static struct cfq_queue *cfq_select_queu
 	 * conditions to happen (or time out) before selecting a new queue.
 	 */
 	if (timer_pending(&cfqd->idle_slice_timer) ||
-	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
+	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq)
+	    && !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))) {
 		cfqq = NULL;
 		goto keep_queue;
 	}

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH]cfq-iosched: make nonrot check logic consistent
  2009-12-03 12:00   ` Jens Axboe
@ 2009-12-04  8:21     ` Shaohua Li
  0 siblings, 0 replies; 5+ messages in thread
From: Shaohua Li @ 2009-12-04  8:21 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, akpm

On Thu, Dec 03, 2009 at 08:00:21PM +0800, Jens Axboe wrote:
> On Thu, Dec 03 2009, Jens Axboe wrote:
> > On Thu, Dec 03 2009, Shaohua Li wrote:
> > > Send again, last post seems lost.
> > > 
> > > cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same
> > > thing should be done at cfq_select_queue() too, otherwise we will still see
> > > idle window. This makes the nonrot check logic consistent in cfq.
> > > Tests in a intel SSD with low_latency knob close, below patch can triple disk
> > > thoughput for muti-thread sequential read.
> > > 
> > > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > > ---
> > >  block/cfq-iosched.c |    3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > Index: linux/block/cfq-iosched.c
> > > ===================================================================
> > > --- linux.orig/block/cfq-iosched.c	2009-11-11 13:44:00.000000000 +0800
> > > +++ linux/block/cfq-iosched.c	2009-11-11 13:45:33.000000000 +0800
> > > @@ -1215,7 +1215,8 @@ static struct cfq_queue *cfq_select_queu
> > >  	 * conditions to happen (or time out) before selecting a new queue.
> > >  	 */
> > >  	if (timer_pending(&cfqd->idle_slice_timer) ||
> > > -	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
> > > +	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq)
> > > +	    && !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))) {
> > >  		cfqq = NULL;
> > >  		goto keep_queue;
> > >  	}
> > 
> > Thanks, applied to 2.6.33 queue.
> 
> On second check, we now hide that logic in cfq_should_idle() and as such
> your patch no longer applies. I suggest you re-test with -next or my
> for-2.6.33 branch, it has a big number of pending CFQ updates for
> 2.6.33.
-next has the same issue too. Below is updated patch.

cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same
thing should be done at cfq_select_queue() too, otherwise we will still see
idle window. This makes the nonrot check logic consistent in cfq.
Tests in a intel SSD with low_latency knob close, below patch can triple disk
thoughput for muti-thread sequential read.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 08b057b..abc5206 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1795,7 +1795,8 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq)
 		return false;
 
 	/* We do for queues that were marked with idle window flag. */
-	if (cfq_cfqq_idle_window(cfqq))
+	if (cfq_cfqq_idle_window(cfqq) &&
+	   !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))
 		return true;
 
 	/*

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH]cfq-iosched: make nonrot check logic consistent
  2009-12-03 11:57 ` Jens Axboe
@ 2009-12-03 12:00   ` Jens Axboe
  2009-12-04  8:21     ` Shaohua Li
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2009-12-03 12:00 UTC (permalink / raw)
  To: Shaohua Li; +Cc: linux-kernel, akpm

On Thu, Dec 03 2009, Jens Axboe wrote:
> On Thu, Dec 03 2009, Shaohua Li wrote:
> > Send again, last post seems lost.
> > 
> > cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same
> > thing should be done at cfq_select_queue() too, otherwise we will still see
> > idle window. This makes the nonrot check logic consistent in cfq.
> > Tests in a intel SSD with low_latency knob close, below patch can triple disk
> > thoughput for muti-thread sequential read.
> > 
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > ---
> >  block/cfq-iosched.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > Index: linux/block/cfq-iosched.c
> > ===================================================================
> > --- linux.orig/block/cfq-iosched.c	2009-11-11 13:44:00.000000000 +0800
> > +++ linux/block/cfq-iosched.c	2009-11-11 13:45:33.000000000 +0800
> > @@ -1215,7 +1215,8 @@ static struct cfq_queue *cfq_select_queu
> >  	 * conditions to happen (or time out) before selecting a new queue.
> >  	 */
> >  	if (timer_pending(&cfqd->idle_slice_timer) ||
> > -	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
> > +	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq)
> > +	    && !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))) {
> >  		cfqq = NULL;
> >  		goto keep_queue;
> >  	}
> 
> Thanks, applied to 2.6.33 queue.

On second check, we now hide that logic in cfq_should_idle() and as such
your patch no longer applies. I suggest you re-test with -next or my
for-2.6.33 branch, it has a big number of pending CFQ updates for
2.6.33.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH]cfq-iosched: make nonrot check logic consistent
  2009-12-03  3:51 Shaohua Li
@ 2009-12-03 11:57 ` Jens Axboe
  2009-12-03 12:00   ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2009-12-03 11:57 UTC (permalink / raw)
  To: Shaohua Li; +Cc: linux-kernel, akpm

On Thu, Dec 03 2009, Shaohua Li wrote:
> Send again, last post seems lost.
> 
> cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same
> thing should be done at cfq_select_queue() too, otherwise we will still see
> idle window. This makes the nonrot check logic consistent in cfq.
> Tests in a intel SSD with low_latency knob close, below patch can triple disk
> thoughput for muti-thread sequential read.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> ---
>  block/cfq-iosched.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: linux/block/cfq-iosched.c
> ===================================================================
> --- linux.orig/block/cfq-iosched.c	2009-11-11 13:44:00.000000000 +0800
> +++ linux/block/cfq-iosched.c	2009-11-11 13:45:33.000000000 +0800
> @@ -1215,7 +1215,8 @@ static struct cfq_queue *cfq_select_queu
>  	 * conditions to happen (or time out) before selecting a new queue.
>  	 */
>  	if (timer_pending(&cfqd->idle_slice_timer) ||
> -	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
> +	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq)
> +	    && !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))) {
>  		cfqq = NULL;
>  		goto keep_queue;
>  	}

Thanks, applied to 2.6.33 queue.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH]cfq-iosched: make nonrot check logic consistent
@ 2009-12-03  3:51 Shaohua Li
  2009-12-03 11:57 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Shaohua Li @ 2009-12-03  3:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: jens.axboe, akpm

Send again, last post seems lost.

cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same
thing should be done at cfq_select_queue() too, otherwise we will still see
idle window. This makes the nonrot check logic consistent in cfq.
Tests in a intel SSD with low_latency knob close, below patch can triple disk
thoughput for muti-thread sequential read.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 block/cfq-iosched.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/block/cfq-iosched.c
===================================================================
--- linux.orig/block/cfq-iosched.c	2009-11-11 13:44:00.000000000 +0800
+++ linux/block/cfq-iosched.c	2009-11-11 13:45:33.000000000 +0800
@@ -1215,7 +1215,8 @@ static struct cfq_queue *cfq_select_queu
 	 * conditions to happen (or time out) before selecting a new queue.
 	 */
 	if (timer_pending(&cfqd->idle_slice_timer) ||
-	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
+	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq)
+	    && !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))) {
 		cfqq = NULL;
 		goto keep_queue;
 	}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-04  8:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-11  6:15 [PATCH]cfq-iosched: make nonrot check logic consistent Shaohua Li
2009-12-03  3:51 Shaohua Li
2009-12-03 11:57 ` Jens Axboe
2009-12-03 12:00   ` Jens Axboe
2009-12-04  8:21     ` Shaohua Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.