throtl_pop_queued(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

throtl_pop_queued β€” pop the first bio form a qnode list

okay bestie, yes, the page literally says "form" β€” that's the manpage's own typo for "from", not me, I promise 😭 we keep the lore intact.


✨ SYNOPSIS ✨

struct bio * throtl_pop_queued (struct throtl_service_queue *sq , struct
throtl_grp **tg_to_put , bool rw );

πŸŽ€ ARGUMENTS πŸŽ€

  • sq β€” the service_queue we're popping a bio out of, bestie. that's the whole assignment πŸ’…
  • tg_to_put β€” an optional out argument, for the throtl_grp that needs to get put. optional is the key word here, hold that thought 🫢
  • rw β€” read/write. that's it. that's the flag 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe ✨ β€” we pop the first bio from the qnode list sq->queued. And lowkey the first thing we focus on is the iops list, because bios are ultimately dispatched from it. that's the main character right there πŸ‘‘

After popping, the first qnode gets removed from sq->queued if it's empty, OR it gets moved to the end of sq->queued β€” so the popping order stays round-robin. iconic behavior honestly, the queue is taking turns 🌈

Now listen closely, because this part is a whole commitment πŸ’€

When that first qnode is removed, its associated throtl_grp should be put too. Here's the fork in the road:

  • If tg_to_put is NULL, this function automatically puts it for you. so chill, it's handled 🧚
  • Otherwise, *tg_to_put is set to the throtl_grp to put β€” and the caller is responsible for putting it. that's you. you're the caller. don't forget or it's giving leak energy πŸ˜­πŸ™ˆ

🌸 SEE ALSO 🌸

Kernel file ./block/blk-throttle.c and the whole friend group: sq_to_tg(9), sq_to_td(9), throtl_log(9), throtl_qnode_add_bio(9), throtl_peek_queued(9), throtl_schedule_next_dispatch(9), throtl_add_bio_tg(9), throtl_pending_timer_fn(9), blk_throtl_dispatch_work_fn(9) β€” iykyk πŸ’œ


and that's the page, bestie πŸŽ€ this lil icon lives in ./block, dated October 2026, and it's literally titled throtl_pop_queued(9) β€” slay, go pop some bios responsibly βœ¨πŸ’–

πŸ“¦ where this page comes from