CFQ: add think time check for service tree
authorShaohua Li <shaohua.li@intel.com>
Tue, 12 Jul 2011 12:24:55 +0000 (14:24 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 12 Jul 2011 12:24:55 +0000 (14:24 +0200)
commitf5f2b6ceb23e02ff35c6dbc6a39aa776ace99cda
tree19ea26a1832c03c1c221675d3372b86abd12cc83
parent383cd7213f95a2784ab5038fe292844178768b82
CFQ: add think time check for service tree

Currently when the last queue of a service tree has no request, we don't
expire the queue to hope request from the service tree comes soon, so the
service tree doesn't miss its share. But if the think time is big, the
assumption isn't correct and we just waste bandwidth. In such case, we
don't do idle.

[global]
runtime=10
direct=1

[test1]
rw=randread
ioengine=libaio
size=500m
directory=/mnt
filename=file1
thinktime=9000

[test2]
rw=read
ioengine=libaio
size=1G
directory=/mnt
filename=file2

patched base
test1 41k/s 33k/s
test2 15868k/s 15789k/s
total 15902k/s 15817k/s

A slightly better

To check if the patch changes behavior of queue without think time. I also
tried to give test1 2ms think time or no think time. The test has variation
even without the patch, but the average throughput doesn't change with/without
the patch.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/cfq-iosched.c