]> git.baikalelectronics.ru Git - kernel.git/commit
cfq-iosched: Don't wait if queue already has requests.
authorJustin TerAvest <teravest@google.com>
Wed, 9 Feb 2011 13:20:03 +0000 (14:20 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 9 Feb 2011 13:22:36 +0000 (14:22 +0100)
commitaa9817c02a7de72867f3fb72b428842ac4870c50
treeace818b81f26c30c473af698882dc9786d13afe5
parent98da81e9f326dde061dec8840be3eebec5e8803e
cfq-iosched: Don't wait if queue already has requests.

Commit e525b3ef799c3030ee62579901126bff742620de 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.

Cc: stable@kernel.org
Signed-off-by: Justin TerAvest <teravest@google.com>
Reviewed-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/cfq-iosched.c