]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
block, bfq: extend incomplete name of field on_st
authorPaolo Valente <paolo.valente@linaro.org>
Mon, 3 Feb 2020 10:40:57 +0000 (11:40 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Feb 2020 13:58:15 +0000 (06:58 -0700)
The flag on_st in the bfq_entity data structure is true if the entity
is on a service tree or is in service. Yet the name of the field,
confusingly, does not mention the second, very important case. Extend
the name to mention the second case too.

Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-cgroup.c
block/bfq-iosched.c
block/bfq-iosched.h
block/bfq-wf2q.c

index 8ab7f18ff8cb2bbd53b32fd3f511b7174074c0f5..c818c64766e55095ba4a6fac8997ac8f43386488 100644 (file)
@@ -659,7 +659,7 @@ void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
 
        if (bfq_bfqq_busy(bfqq))
                bfq_deactivate_bfqq(bfqd, bfqq, false, false);
-       else if (entity->on_st)
+       else if (entity->on_st_or_in_serv)
                bfq_put_idle_entity(bfq_entity_service_tree(entity), entity);
        bfqg_and_blkg_put(bfqq_group(bfqq));
 
index 15dfb0844644a2c72c98014963510566fc5c0d3f..28770ec7c06f23e0490964882fe46de6815d058c 100644 (file)
@@ -1059,7 +1059,7 @@ bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_data *bfqd,
 
 static int bfqq_process_refs(struct bfq_queue *bfqq)
 {
-       return bfqq->ref - bfqq->allocated - bfqq->entity.on_st -
+       return bfqq->ref - bfqq->allocated - bfqq->entity.on_st_or_in_serv -
                (bfqq->weight_counter != NULL);
 }
 
index 8526f20c53bc103edabd0d39f77f453a0b5c5ce7..f1cb89def7f8a7b31981aff88fcf4c71317aa8d1 100644 (file)
@@ -150,7 +150,7 @@ struct bfq_entity {
         * Flag, true if the entity is on a tree (either the active or
         * the idle one of its service_tree) or is in service.
         */
-       bool on_st;
+       bool on_st_or_in_serv;
 
        /* B-WF2Q+ start and finish timestamps [sectors/weight] */
        u64 start, finish;
index ffe9ce9faa892df287c786e41801e441982bb3d9..26776bdbdf360c97635c6fb197b0b3c497689f2e 100644 (file)
@@ -645,7 +645,7 @@ static void bfq_forget_entity(struct bfq_service_tree *st,
 {
        struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
 
-       entity->on_st = false;
+       entity->on_st_or_in_serv = false;
        st->wsum -= entity->weight;
        if (bfqq && !is_in_service)
                bfq_put_queue(bfqq);
@@ -999,7 +999,7 @@ static void __bfq_activate_entity(struct bfq_entity *entity,
                 */
                bfq_get_entity(entity);
 
-               entity->on_st = true;
+               entity->on_st_or_in_serv = true;
        }
 
 #ifdef CONFIG_BFQ_GROUP_IOSCHED
@@ -1165,7 +1165,10 @@ bool __bfq_deactivate_entity(struct bfq_entity *entity, bool ins_into_idle_tree)
        struct bfq_service_tree *st;
        bool is_in_service;
 
-       if (!entity->on_st) /* entity never activated, or already inactive */
+       if (!entity->on_st_or_in_serv) /*
+                                       * entity never activated, or
+                                       * already inactive
+                                       */
                return false;
 
        /*
@@ -1620,7 +1623,7 @@ bool __bfq_bfqd_reset_in_service(struct bfq_data *bfqd)
         * service tree either, then release the service reference to
         * the queue it represents (taken with bfq_get_entity).
         */
-       if (!in_serv_entity->on_st) {
+       if (!in_serv_entity->on_st_or_in_serv) {
                /*
                 * If no process is referencing in_serv_bfqq any
                 * longer, then the service reference may be the only