[patch v2 5/8]block: fiops preserve vios key for deep queue depth workload

From: Shaohua Li
Date: Mon Jan 30 2012 - 02:08:35 EST


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 <shaohua.li@xxxxxxxxx>
---
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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/