drm_sched_stop(9)
π drm_sched_stop(9) β like, the Kernel API Manual page, bestie β¨
Okay so we're in the Kernel API Manual today and this one's called drm_sched_stop(9) and honestly? It does exactly what it says on the tin. Let's get into it π«Ά
πΈ NAME πΈ
drm_sched_stop β stop the scheduler. That's it. That's the whole vibe. β¨
π SYNOPSIS π
void drm_sched_stop (struct drm_gpu_scheduler *sched , struct
drm_sched_job *bad );
π¦ ARGUMENTS π¦
schedβ the scheduler instance in question. Your main character, basically πbadβ the job that caused the time out. Yeah. That one. π
π DESCRIPTION π
So what it does is: it stops the scheduler, and it also like... removes and frees all the completed jobs. Both. At once. Multi-tasking icon behavior, no cap. π§
π NOTE π
Okay this part actually matters so read it, bestie β I'm serious π
The bad job will not be freed, because it might get used later. So it's the caller's responsibility to release it manually if it's not part of the pending list any more. Not me doing your cleanup for you, periodt. π
This function is typically used for reset recovery β see the docu of drm_sched_backend_ops.timedout_job for the details if you want the full lore iykyk. Do not call it for scheduler teardown, i.e., before calling drm_sched_fini. Just don't. π«
And since it's only used for reset recovery, drivers must not call this function in their struct drm_sched_backend_ops.timedout_job callback when they skip a reset using enum drm_gpu_sched_stat.DRM_GPU_SCHED_STAT_NO_HANG. Like, that's the rule. Full stop. π
Fr fr, these caveats are the whole point of the page β skipping a reset with DRM_GPU_SCHED_STAT_NO_HANG and then calling this anyway is not the move. π
β¨ SEE ALSO β¨
Right, buckle up, this list is long long, but every single one of these ate and we're listing them all because we don't do leaving-things-out here: π
- Kernel file
./drivers/gpu/drm/scheduler/sched_main.c Overview(9)Flow Control(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_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)
Okay that's the whole page, you're officially educated π This little drop came from ./drivers/gpu/drm/scheduler and it's dated October 2026 β go off, king πβ¨
π¦ 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