]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - block/bfq-iosched.c
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / block / bfq-iosched.c
index 12bbc6b8657dd686b918f27a3d5f2d7db133d778..436b6ca6b1759228b69d3087c5e4ea0708940690 100644 (file)
@@ -3483,11 +3483,17 @@ static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq)
                        }
                }
        }
-       /* Update weight both if it must be raised and if it must be lowered */
+       /*
+        * To improve latency (for this or other queues), immediately
+        * update weight both if it must be raised and if it must be
+        * lowered. Since, entity may be on some active tree here, and
+        * might have a pending change of its ioprio class, invoke
+        * next function with the last parameter unset (see the
+        * comments on the function).
+        */
        if ((entity->weight > entity->orig_weight) != (bfqq->wr_coeff > 1))
-               __bfq_entity_update_weight_prio(
-                       bfq_entity_service_tree(entity),
-                       entity);
+               __bfq_entity_update_weight_prio(bfq_entity_service_tree(entity),
+                                               entity, false);
 }
 
 /*
@@ -4293,6 +4299,9 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd)
                        bfq_bfqq_expire(bfqd, bfqq, false,
                                        BFQQE_NO_MORE_REQUESTS);
        }
+
+       if (!bfqd->rq_in_driver)
+               bfq_schedule_dispatch(bfqd);
 }
 
 static void bfq_put_rq_priv_body(struct bfq_queue *bfqq)