[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110216001443.906566574@clark.kroah.org>
Date: Tue, 15 Feb 2011 16:14:05 -0800
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Justin TerAvest <teravest@...gle.com>,
Vivek Goyal <vgoyal@...hat.com>,
Jens Axboe <jaxboe@...ionio.com>
Subject: [188/272] cfq-iosched: Dont wait if queue already has requests.
2.6.37-stable review patch. If anyone has any objections, please let us know.
------------------
From: Justin TerAvest <teravest@...gle.com>
commit 02a8f01b5a9f396d0327977af4c232d0f94c45fd upstream.
Commit 7667aa0630407bc07dc38dcc79d29cc0a65553c1 added logic to wait for
the last queue of the group to become busy (have at least one request),
so that the group does not lose out for not being continuously
backlogged. The commit did not check for the condition that the last
queue already has some requests. As a result, if the queue already has
requests, wait_busy is set. Later on, cfq_select_queue() checks the
flag, and decides that since the queue has a request now and wait_busy
is set, the queue is expired. This results in early expiration of the
queue.
This patch fixes the problem by adding a check to see if queue already
has requests. If it does, wait_busy is not set. As a result, time slices
do not expire early.
The queues with more than one request are usually buffered writers.
Testing shows improvement in isolation between buffered writers.
Signed-off-by: Justin TerAvest <teravest@...gle.com>
Reviewed-by: Gui Jianfeng <guijianfeng@...fujitsu.com>
Acked-by: Vivek Goyal <vgoyal@...hat.com>
Signed-off-by: Jens Axboe <jaxboe@...ionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
block/cfq-iosched.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3412,6 +3412,10 @@ static bool cfq_should_wait_busy(struct
{
struct cfq_io_context *cic = cfqd->active_cic;
+ /* If the queue already has requests, don't wait */
+ if (!RB_EMPTY_ROOT(&cfqq->sort_list))
+ return false;
+
/* If there are other queues in the group, don't wait */
if (cfqq->cfqg->nr_cfqq > 1)
return false;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists