• Shaohua Li's avatar
    CFQ: add think time check for service tree · f5f2b6ce
    Shaohua Li authored
    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: default avatarShaohua Li <shaohua.li@intel.com>
    Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
    Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
    f5f2b6ce
cfq-iosched.c 107 KB