cfq-iosched: Do not merge queues of BE and IDLE classes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 9, 2010 - 11:59 am

Gitweb:     http://git.kernel.org/linus/39c01b219fd30c74869b6fc8749f7900f04e9ef6
Commit:     39c01b219fd30c74869b6fc8749f7900f04e9ef6
Parent:     b1ffe737f5b743115ee46ffb59e338e580c54902
Author:     Divyesh Shah <dpshah@google.com>
AuthorDate: Thu Mar 25 15:45:57 2010 +0100
Committer:  Jens Axboe <jens.axboe@oracle.com>
CommitDate: Thu Mar 25 15:46:38 2010 +0100

    cfq-iosched: Do not merge queues of BE and IDLE classes
    
    Even if they are found to be co-operating.
    
    The prio_trees do not have any IDLE cfqqs on them. cfq_close_cooperator()
    is called from cfq_select_queue() and cfq_completed_request(). The latter
    ensures that the close cooperator code does not get invoked if the current
    cfqq is of class IDLE but the former doesn't seem to have any such checks.
    So an IDLE cfqq may get merged with a BE cfqq from the same group which
    should be avoided.
    
    Signed-off-by: Divyesh Shah<dpshah@google.com>
    Acked-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
---
 block/cfq-iosched.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 2f91c53..2c7a0f4 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1723,6 +1723,8 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
 {
 	struct cfq_queue *cfqq;
 
+	if (cfq_class_idle(cur_cfqq))
+		return NULL;
 	if (!cfq_cfqq_sync(cur_cfqq))
 		return NULL;
 	if (CFQQ_SEEKY(cur_cfqq))
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
cfq-iosched: Do not merge queues of BE and IDLE classes, Linux Kernel Mailing ..., (Fri Apr 9, 11:59 am)