public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]cfq-iosched: don't stop async queue with async requests pending
@ 2010-01-13  7:44 Shaohua Li
  2010-01-13  8:18 ` Corrado Zoccolo
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Shaohua Li @ 2010-01-13  7:44 UTC (permalink / raw)
  To: jens.axboe; +Cc: linux-kernel, jmoyer, vgoyal, guijianfeng, yanmin_zhang

My SSD speed of direct write is about 80m/s, while I test page writeback,
the speed can only go to 68m/s. Below patch fixes this.
It appears we missused cfq_should_idle in cfq_may_dispatch. cfq_should_idle
means a queue should idle because it's seekless sync queue or it's the last queue,
which is to maintain service tree time slice. So it doesn't mean the
last queue is always a sync queue. If the last queue is asyn queue,
we definitely shouldn't stop dispatch requests because of pending async
requests.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 918c7fd..8198079 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2222,7 +2222,8 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
 	/*
 	 * Drain async requests before we start sync IO
 	 */
-	if (cfq_should_idle(cfqd, cfqq) && cfqd->rq_in_driver[BLK_RW_ASYNC])
+	if (cfq_cfqq_sync(cfqq) && cfq_should_idle(cfqd, cfqq)
+		&& cfqd->rq_in_driver[BLK_RW_ASYNC])
 		return false;
 
 	/*

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

end of thread, other threads:[~2010-01-19 22:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13  7:44 [PATCH]cfq-iosched: don't stop async queue with async requests pending Shaohua Li
2010-01-13  8:18 ` Corrado Zoccolo
2010-01-13  8:23   ` Shaohua Li
2010-01-13 11:13     ` Vivek Goyal
2010-01-14  3:41       ` Shaohua Li
2010-01-14  5:27         ` Gui Jianfeng
2010-01-14  6:17           ` Shaohua Li
2010-01-14  8:21             ` Gui Jianfeng
2010-01-14  9:04               ` Shaohua Li
2010-01-14 11:09             ` Vivek Goyal
2010-01-19  0:52               ` Li, Shaohua
2010-01-19 22:33                 ` Vivek Goyal
2010-01-13 11:10 ` Vivek Goyal
2010-01-13 21:30   ` Corrado Zoccolo
2010-01-13 22:26     ` Vivek Goyal
2010-01-14  2:46 ` Gui Jianfeng
2010-01-14  3:43   ` Shaohua Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox