FLOW CONTROL(9)
π FLOW CONTROL (9) β Kernel API Manual β¨
okay so bestie, welcome to Flow Control, a page straight out of the Kernel API Manual and honestly it ate. no cap, it's giving "traffic cop but make it GPU" π¦π
πΈ DESCRIPTION πΈ
so the DRM GPU scheduler has this whole flow control mechanism, right? its entire job is to regulate the rate at which jobs fetched from scheduler entities actually get executed. like, it's the vibe-checker at the club door of your GPU π
in this context, the drm_gpu_scheduler keeps track of two things, and yes they're both the main characters:
- a driver specified credit limit β this represents the capacity of this scheduler, iykyk π«Ά
- a credit count
and every single drm_sched_job carries a driver specified number of credits. every one. periodt.
π¦ how the credits actually work π¦
so once a job is executed β but not yet finished, key detail bestie β that job's credits contribute to the scheduler's credit count until the job is finished. so it's like the credits are out there living their life, still counted, until the job is actually done π«
and here's where it gets good: if by executing one more job the scheduler's credit count would exceed the scheduler's credit limit, that job won't be executed. full stop. π
instead, the scheduler will wait until the credit count has decreased enough to not overflow its credit limit. and what does that mean? it means waiting for previously executed jobs. like, it's literally just waiting its turn. so iconic of it honestly ππ
ngl this whole thing is basically "you can't queue more until the credits free up", and that's the entire power move π₯
β¨ SEE ALSO β¨
okay so here's the whole friend group, every single one, no skipping π:
- Kernel file
./drivers/gpu/drm/scheduler/sched_main.cβOverview(9) sched_policy (int)(9)drm_sched_can_queue(9)drm_sched_run_job_queue(9)drm_sched_run_free_queue(9)drm_sched_job_done(9)drm_sched_job_done_cb(9)drm_sched_start_timeout(9)drm_sched_tdr_queue_imm(9)drm_sched_fault(9)drm_sched_suspend_timeout(9)drm_sched_resume_timeout(9)drm_sched_job_reinsert_on_false_timeout(9)drm_sched_stop(9)drm_sched_start(9)drm_sched_resubmit_jobs(9)drm_sched_job_init(9)drm_sched_job_arm(9)drm_sched_job_add_dependency(9)drm_sched_job_add_syncobj_dependency(9)drm_sched_job_add_resv_dependencies(9)drm_sched_job_add_implicit_dependencies(9)drm_sched_job_has_dependency(9)drm_sched_job_cleanup(9)drm_sched_wakeup(9)drm_sched_select_entity(9)drm_sched_get_finished_job(9)drm_sched_pick_best(9)drm_sched_free_job_work(9)drm_sched_run_job_work(9)drm_sched_init(9)drm_sched_fini(9)drm_sched_increase_karma(9)drm_sched_wqueue_ready(9)drm_sched_wqueue_stop(9)drm_sched_wqueue_start(9)drm_sched_is_stopped(9)drm_sched_job_is_signaled(9)
like, go read all of them. or don't. but they're there π
π and that's the page!! π
before you go, tiny sign-off because we're classy: this lil beauty lives down in ./drivers/gpu/drm/scheduler, it's dated October 2026, and it's officially page Flow Control(9). so like, cite it properly bestie π«Άπβ¨
π¦ 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