lkml.org 
[lkml]   [2022]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/5] block, bfq: remove redundant max_t() in bfq_bfqq_charge_time()
    Date
    The "tot_serv_to_charge" is great than or equal to "entity->service",
    so no need to do max_t() again.

    Signed-off-by: Yuwei Guan <Yuwei.Guan@zeekrlife.com>
    ---
    block/bfq-wf2q.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
    index 8fc3da4c23bb..3da08f4be633 100644
    --- a/block/bfq-wf2q.c
    +++ b/block/bfq-wf2q.c
    @@ -867,8 +867,7 @@ void bfq_bfqq_charge_time(struct bfq_data *bfqd, struct bfq_queue *bfqq,
    if (tot_serv_to_charge > entity->budget)
    entity->budget = tot_serv_to_charge;

    - bfq_bfqq_served(bfqq,
    - max_t(int, 0, tot_serv_to_charge - entity->service));
    + bfq_bfqq_served(bfqq, tot_serv_to_charge - entity->service);
    }

    static void bfq_update_fin_time_enqueue(struct bfq_entity *entity,
    --
    2.34.1
    \
     
     \ /
      Last update: 2022-11-02 12:45    [W:2.873 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site