__bfq_lookup_next_entity(9)
π NAME π
okay bestie, meet __bfq_lookup_next_entity(9) β yes, from the Kernel API Manual, and yes she is that girl. Her whole job: return the first eligible entity in @st. That's it. That's the name. π
β¨ SYNOPSIS β¨
signature check, copy it exactly bestie:
struct bfq_entity * __bfq_lookup_next_entity (struct bfq_service_tree
*st , bool in_service );
π ARGUMENTS π
stβ the service tree. the tree in question.in_serviceβ whether or not there is an in-service entity for thesched_datathis active tree belongs to. lowkey a yes/no vibe.
π¦ DESCRIPTION π¦
okay so picture this: if there is no in-service entity for the sched_data that st belongs to, then return the entity that will be set in service if:
- the parent entity this
stbelongs to is set in service; - no entity belonging to such parent entity undergoes a state change that would influence the timestamps of the entity (e.g., becomes idle, becomes backlogged, changes its budget, ...).
In this first case, update the virtual time in st too (see the comments on this update inside the function). π«Ά
π« the plot twist: there is an in-service entity
in contrast, if there is an in-service entity, then return the entity that would be set in service if not only the above conditions, but also the next one held true: the currently in-service entity, on expiration,
- gets a finish time equal to the current one, or
- is not eligible any more, or
- is idle.
so yeah β same mission, extra condition energy. β¨
πΈ SEE ALSO πΈ
the Kernel file ./block/bfq-wf2q.c is the home base, and the whole linked-up friend group 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_bfqq_charge_time(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)
cute little sign-off: source/version./block, dateOctober 2026, page__bfq_lookup_next_entity(9)β mwah, go read the kernel bestie ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms