bfq_bfqq_charge_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this is bfq_bfqq_charge_time(9) from the Kernel API Manual, and it's literally the function that charges an amount of service equivalent to the length of the time interval during which bfqq has been in service. that's the whole assignment. πŸ’…


✨ SYNOPSIS ✨

void bfq_bfqq_charge_time (struct bfq_data *bfqd , struct bfq_queue
*bfqq , unsigned long time_ms );

🫢 ARGUMENTS 🫢

  • bfqd β€” the device.
  • bfqq β€” the queue that needs a service update.
  • time_ms β€” the amount of time during which the queue has received service.

🧚 DESCRIPTION 🧚

okay so here's the tea: if a queue does not consume its budget fast enough, then providing the queue with service fairness may impair throughput, more or less severely. for this reason, queues that consume their budget slowly are provided with time fairness instead of service fairness. this goal is achieved through the BFQ scheduling engine, even if such an engine works in the service domain, and not in the time domain. the trick is charging these queues with an inflated amount of service, equal to the amount of service that they would have received during their service slot if they had been fast β€” i.e., if their requests had been dispatched at a rate equal to the estimated peak rate. iconic behavior, honestly. πŸ‘‘

and ngl, it is worth noting that time fairness can cause important distortions in terms of bandwidth distribution, on devices with internal queueing. the reason is that I/O requests dispatched during the service slot of a queue may be served after that service slot is finished, and may have a total processing time loosely correlated with the duration of the service slot. this is especially true for short service slots. so yeah, short slots can get messy 😭.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./block/bfq-wf2q.c β€” and the whole linked squad is: bfq_gt(9), bfq_update_next_in_service(9), bfq_delta(9), bfq_calc_finish(9), bfq_entity_of(9), bfq_extract(9), bfq_idle_extract(9), bfq_insert(9), bfq_update_min(9), bfq_update_active_node(9), bfq_update_active_tree(9), bfq_active_insert(9), bfq_ioprio_to_weight(9), bfq_weight_to_ioprio(9), bfq_find_deepest(9), bfq_active_extract(9), bfq_idle_insert(9), bfq_forget_entity(9), bfq_put_idle_entity(9), bfq_forget_idle(9), bfq_bfqq_served(9), __bfq_activate_entity(9), __bfq_requeue_entity(9), bfq_activate_requeue_entity(9), __bfq_deactivate_entity(9), bfq_deactivate_entity(9), bfq_calc_vtime_jump(9), bfq_first_active_entity(9), __bfq_lookup_next_entity(9), bfq_lookup_next_entity(9).


that's the page, bestie! brought to you by source/version ./block, dated October 2026, signed bfq_bfqq_charge_time(9) πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from