bfq_forget_entity(9)
π bfq_forget_entity β the kernel API manual, bestie edition π
okay so real talk, this is a page from the <pink>Kernel API Manual</pink> and it's called bfq_forget_entity. yes we're in the scheduler guts. yes it's giving main character energy. let's go π«Ά
β¨ NAME β¨
bfq_forget_entity β literally means do not consider entity any longer for scheduling. like, we're done here, entity. bye. π
β¨ SYNOPSIS β¨
void bfq_forget_entity (struct bfq_service_tree *st , struct bfq_entity
*entity , bool is_in_service );
she takes three things and returns void, no cap. π
β¨ ARGUMENTS β¨
stβ the service tree. that's her. π³entityβ the entity being removed. it's getting uninvited from the party πis_in_serviceβ abool, and it'strueifentityis currently the in-service entity. iykyk π₯
β¨ DESCRIPTION β¨
okay so first thing: forget everything about entity. like fully. π§ π¨
and in addition to that β here's the part people miss β if entity represents a queue, and that queue is not in service, then we release the service reference to the queue. you know, the one taken through bfq_get_entity. π
fr fr, in this case there is really no more service reference to the queue, because the queue is also outside any service tree. it's free. it's unbothered. it's not on the tree. πΈ
if, instead, the queue is in service? then __bfq_bfqd_reset_in_service will take care of putting the reference when the queue finally stops being served. so like, not your problem, bestie, someone else is handling it. π«Ά
β οΈ tiny vibe check: two different code paths here depending on whether the queue is in service. don't mix them up or you'll leak a reference and that's not slay. π
β¨ SEE ALSO β¨
kernel file ./block/bfq-wf2q.c β go read it, it's iconic π
the whole friend group:
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_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)bfq_lookup_next_entity(9)
and that's the whole page, bestie!! πβ¨ππ¦πΈπ π«Ά
this lil beauty comes to you from <purple>./block</purple>, dated <cyan>October 2026</cyan>. mwah, go forth and forget some entities ππ
π¦ 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