blkcg_schedule_throttle(9)
π 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:
blkcg_css(9)blkg_free(9)bio_blkcg_css(9)blkcg_parent(9)blkg_alloc(9)blkg_lookup_create(9)blkcg_print_blkgs(9)__blkg_prfill_u64(9)blkg_conf_init(9)blkg_conf_open_bdev(9)blkg_conf_prep(9)blkg_conf_unprep(9)blkg_conf_close_bdev(9)blkcg_destroy_blkgs(9)blkcg_pin_online(9)blkcg_unpin_online(9)blkcg_css_offline(9)blkcg_activate_policy(9)blkcg_deactivate_policy(9)blkcg_policy_register(9)blkcg_policy_unregister(9)blkcg_maybe_throttle_current(9)blkcg_add_delay(9)blkg_tryget_closest(9)bio_associate_blkg_from_css(9)bio_associate_blkg(9)bio_clone_blkg_association(9)
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
- 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