bfq_forget_entity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” a bool, and it's true if entity is 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:


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