If the task has running request, even it's added into service tree newly, we preserve its vios key, so it will not lost its share. This should work for task driving big queue depth. For single depth task, there is no approach to preserve its vios key. Signed-off-by: Shaohua Li --- block/fiops-iosched.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) Index: linux/block/fiops-iosched.c =================================================================== --- linux.orig/block/fiops-iosched.c 2012-01-18 14:43:51.000000000 +0800 +++ linux/block/fiops-iosched.c 2012-01-18 14:44:25.000000000 +0800 @@ -188,9 +188,12 @@ static void fiops_service_tree_add(struc int left; /* New added IOC */ - if (RB_EMPTY_NODE(&ioc->rb_node)) - vios = max_vios(service_tree->min_vios, ioc->vios); - else { + if (RB_EMPTY_NODE(&ioc->rb_node)) { + if (ioc->in_flight > 0) + vios = ioc->vios; + else + vios = max_vios(service_tree->min_vios, ioc->vios); + } else { vios = ioc->vios; /* ioc->service_tree might not equal to service_tree */ fiops_rb_erase(&ioc->rb_node, ioc->service_tree);