函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bfq-iosched.c Create Date:2022-07-27 19:31:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__bfq_bfqq_recalc_budget - try to adapt the budget to the @bfqq behavior.*@bfqd: device data.*@bfqq: queue to update.*@reason: reason for expiration.* Handle the feedback on @bfqq budget at queue expiration.* See the body for detailed comments.

函数原型:static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, struct bfq_queue *bfqq, enum bfqq_expiration reason)

返回类型:void

参数:

类型参数名称
struct bfq_data *bfqd
struct bfq_queue *bfqq
enum bfqq_expirationreason
3538  min_budget等于Return min budget, which is a fraction of the current or default* max budget (trying with 1/32)
3540  如果actor by which the weight of this queue is multiplied 恒等于1则budget等于maximum budget allowed from the feedback mechanism
3547  否则budget等于2乘min_budget
3550  bfq_log_bfqq(bfqd, bfqq, "recalc_budg: last budg %d, budg left %d", budget, used also to calculate F_i: F_i = S_i + @budget / @weight , bfq_bfqq_budget_left(bfqq))
3552  bfq_log_bfqq(bfqd, bfqq, "recalc_budg: last max_budg %d, min budg %d", budget, Return min budget, which is a fraction of the current or default* max budget (trying with 1/32))
3554  bfq_log_bfqq(bfqd, bfqq, "recalc_budg: sync %d, seeky %d", bfq_bfqq_sync(bfqq), BFQQ_SEEKY( bfq_queue in service ))
3557  如果bfq_bfqq_sync(bfqq)且actor by which the weight of this queue is multiplied 恒等于1则
3590  否则
3591  如果budget大于5乘min_budgetbudget减等于4乘min_budget
3593  否则budget等于min_budget
3596  退出
3605  退出
3606  :reason恒等于udget consumed
3617  退出
3652  退出
3653  默认
3654  返回
3656  否则如果非bfq_bfqq_sync(bfqq)则
3663  budget等于 maximum budget allotted to a bfq_queue before rescheduling
3666  maximum budget allowed from the feedback mechanism 等于budget
3668  如果 number of budgets assigned 大于等于Minimum number of assigned budgets for which stats are safe to compute. 且非 user-configured max budget value (0 for auto-tuning) maximum budget allowed from the feedback mechanism 等于两数取小(maximum budget allowed from the feedback mechanism , maximum budget allotted to a bfq_queue before rescheduling )
3682  next_rq等于 fifo isn't expired, next request to serve
3683  如果next_rq budget, used also to calculate F_i: F_i = S_i + @budget / @weight 等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedlong, maximum budget allowed from the feedback mechanism , see the definition of bfq_async_charge_factor for details )
3687  bfq_log_bfqq(bfqd, bfqq, "head sect: %u, new budget %d", next_rq ? blk_rq_sectors(next_rq) : 0, budget, used also to calculate F_i: F_i = S_i + @budget / @weight )
调用者
名称描述
bfq_bfqq_expireq_bfqq_expire - expire a queue.*@bfqd: device owning the queue.*@bfqq: the queue to expire.*@compensate: if true, compensate for the time spent idling.*@reason: the reason causing the expiration.* If the process associated with bfqq does slow I/O (e