blkcg_schedule_throttle(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… blkcg_schedule_throttle(9) β€” Kernel API Manual πŸŽ€

okay bestie, this is a kernel API manual page, blkcg_schedule_throttle(9), and it's literally the "hey, this task needs to check for throttling" vibe check. sit down, grab a strawberry drink πŸ“, we're doing block cgroup lore today.


✨ NAME ✨

blkcg_schedule_throttle β€” this task needs to check for throttling 🫢


🌸 SYNOPSIS 🌸

void blkcg_schedule_throttle (struct gendisk *disk , bool use_memdelay
);

the way it's just two arguments and a dream 😭


πŸ¦‹ ARGUMENTS πŸ¦‹

  • disk β€” the disk to throttle. that's the one, that's the target πŸ’…
  • use_memdelay β€” do we charge this to memory delay for PSI. yes it's a whole bool about it, no cap.

πŸ‘‘ DESCRIPTION πŸ‘‘

so this gets called by the IO controller when we already know there's delay accumulated for the blkg of this task. iconic of us, honestly ✨

and no, we do not pass the blkg, because there are places we call this that may not have that information β€” the swapping code for instance will literally only have a block_device at that point. so we work with what we've got πŸ™ˆ

what it does: it sets the notify_resume for the task to check and see if it requires throttling before returning to user space. that's the whole assignment. main character energy.

🚨 also we will only schedule once per syscall β€” this is the important part, bestie.

you can call this over and over and over again and it will only do the check once upon return to user space, and only throttle once. so all that spamming? one check. one throttle. periodt πŸ’€

and if the task needs to be throttled again, it'll need to be re-set at the next time we see the task. so like, don't expect it to just remember. it won't. re-set it πŸ”


πŸ”₯ SEE ALSO πŸ”₯

it's giving "here's the whole friend group" β€” the kernel file is ./block/blk-cgroup.c, and these are all the (9) besties:

iykyk πŸ’œ


and that's the page!! this one lives in ./block, dropped October 2026 πŸ—“οΈβœ¨ mwah, go read the source bestie, ily, bye! πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from