drm_sched_job_cleanup(9)
π drm_sched_job_cleanup(9) π
okay bestie, welcome to the Kernel API Manual β this one's a shortie but she's important, so pay attention π
β¨ NAME β¨
drm_sched_job_cleanup β clean up scheduler job resources π§Ή
β¨ SYNOPSIS β¨
void drm_sched_job_cleanup (struct drm_sched_job *job );
β¨ ARGUMENTS β¨
jobβ the scheduler job we're cleaning up, bestie. that's the one. π«Ά
β¨ DESCRIPTION β¨
So here's the tea β β this function cleans up all the resources that were allocated with drm_sched_job_init. Like, all of them. she's a thorough queen π
Drivers should call this from their error unwind code if job is aborted before drm_sched_job_arm is called. that's the window, okay? that's your moment. πͺ
Now listen, this part matters β drm_sched_job_arm is a point of no return π₯π₯π₯ because it initializes the fences and their sequence number etc. Once that function has been called, you *must* submit it with drm_sched_entity_push_job and you literally cannot just abort it by calling drm_sched_job_cleanup. no cap. there's no take-backsies after drm_sched_job_arm, that ship has sailed π
β οΈ fr fr: after drm_sched_job_arm, cleanup is NOT an abort button. you commit. you push. periodt. π
This function should be called in the drm_sched_backend_ops.free_job callback. that's her home. that's where she lives π β¨
β¨ SEE ALSO β¨
okay this list is long but we don't gatekeep here π go read:
- 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_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_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)
and that's the whole page, icon behavior only π this lil gem lives in ./drivers/gpu/drm/scheduler, dated October 2026 β go clean up your jobs responsibly, 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