aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2012-12-15 22:36:37 -0800
committerMoyster <oysterized@gmail.com>2016-09-13 13:13:23 +0200
commit6626327e2987cd4081b93f91a16eae51888f50f0 (patch)
treebb6ebe5dfd8efadb6dfd0620d548cd61aaa60491
parenta5c6ac2894de2b939b96de9fbb2c4928cecdb7c4 (diff)
block: fiops preserve vios key for deep queue depth workload
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. Change-Id: I40bdaff6430b783b965ca434ffc46b7205b554cd Signed-off-by: Shaohua Li <shaohua.li@intel.com>
-rw-r--r--block/fiops-iosched.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/block/fiops-iosched.c b/block/fiops-iosched.c
index d9ff3d940..84189f385 100644
--- a/block/fiops-iosched.c
+++ b/block/fiops-iosched.c
@@ -188,9 +188,12 @@ static void fiops_service_tree_add(struct fiops_data *fiopsd,
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);