Function report | 
Source Code:block\bfq-iosched.c | 
Create Date:2022-07-28 17:56:11 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:__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.
Proto:static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, struct bfq_queue *bfqq, enum bfqq_expiration reason)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct bfq_data * | bfqd | |
| struct bfq_queue * | bfqq | |
| enum bfqq_expiration | reason | 
| 3538 | min_budget = Return min budget, which is a fraction of the current or default* max budget (trying with 1/32) | 
| 3540 | If actor by which the weight of this queue is multiplied == 1 Then budget = maximum budget allowed from the feedback mechanism | 
| 3547 | Else 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 | If bfq_bfqq_sync(bfqq) && actor by which the weight of this queue is multiplied == 1 Then | 
| 3563 | Case reason == queue has been idling for* too long | 
| 3590 | Else | 
| 3591 | If budget > 5 * min_budget Then budget -= 4 * min_budget | 
| 3593 | Else budget = min_budget | 
| 3596 | Break | 
| 3597 | Case reason == udget took too long to be used | 
| 3604 | budget = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(budget * 2, maximum budget allotted to a bfq_queue before rescheduling ) | 
| 3605 | Break | 
| 3606 | Case reason == udget consumed | 
| 3616 | budget = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(budget * 4, maximum budget allotted to a bfq_queue before rescheduling ) | 
| 3617 | Break | 
| 3618 | Case reason == he queue has no more requests | 
| 3652 | Break | 
| 3653 | Default | 
| 3654 | Return | 
| 3656 | Else if Not bfq_bfqq_sync(bfqq) Then | 
| 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 ) | 
| Name | Describe | 
|---|---|
| bfq_bfqq_expire | q_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 | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |