Lines Matching full:scheduler
274 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in shadow_context_status_change() local
280 spin_lock_irqsave(&scheduler->mmio_context_lock, flags); in shadow_context_status_change()
282 scheduler->engine_owner[ring_id]) { in shadow_context_status_change()
284 intel_gvt_switch_mmio(scheduler->engine_owner[ring_id], in shadow_context_status_change()
286 scheduler->engine_owner[ring_id] = NULL; in shadow_context_status_change()
288 spin_unlock_irqrestore(&scheduler->mmio_context_lock, flags); in shadow_context_status_change()
293 workload = scheduler->current_workload[ring_id]; in shadow_context_status_change()
299 spin_lock_irqsave(&scheduler->mmio_context_lock, flags); in shadow_context_status_change()
300 if (workload->vgpu != scheduler->engine_owner[ring_id]) { in shadow_context_status_change()
302 intel_gvt_switch_mmio(scheduler->engine_owner[ring_id], in shadow_context_status_change()
304 scheduler->engine_owner[ring_id] = workload->vgpu; in shadow_context_status_change()
308 spin_unlock_irqrestore(&scheduler->mmio_context_lock, flags); in shadow_context_status_change()
360 * scheduler might get a wrong state of it during reset. Since the in copy_workload_to_ring_buffer()
802 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in pick_next_workload() local
811 if (!scheduler->current_vgpu) { in pick_next_workload()
816 if (scheduler->need_reschedule) { in pick_next_workload()
821 if (!scheduler->current_vgpu->active || in pick_next_workload()
822 list_empty(workload_q_head(scheduler->current_vgpu, engine))) in pick_next_workload()
829 if (scheduler->current_workload[engine->id]) { in pick_next_workload()
830 workload = scheduler->current_workload[engine->id]; in pick_next_workload()
842 scheduler->current_workload[engine->id] = in pick_next_workload()
843 list_first_entry(workload_q_head(scheduler->current_vgpu, in pick_next_workload()
847 workload = scheduler->current_workload[engine->id]; in pick_next_workload()
1021 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in complete_current_workload() local
1023 scheduler->current_workload[ring_id]; in complete_current_workload()
1067 scheduler->current_workload[ring_id] = NULL; in complete_current_workload()
1094 wake_up(&scheduler->workload_complete_wq); in complete_current_workload()
1096 if (gvt->scheduler.need_reschedule) in complete_current_workload()
1108 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in workload_thread() local
1119 add_wait_queue(&scheduler->waitq[engine->id], &wait); in workload_thread()
1127 remove_wait_queue(&scheduler->waitq[engine->id], &wait); in workload_thread()
1185 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in intel_gvt_wait_vgpu_idle() local
1190 wait_event(scheduler->workload_complete_wq, in intel_gvt_wait_vgpu_idle()
1197 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in intel_gvt_clean_workload_scheduler() local
1201 gvt_dbg_core("clean workload scheduler\n"); in intel_gvt_clean_workload_scheduler()
1207 kthread_stop(scheduler->thread[i]); in intel_gvt_clean_workload_scheduler()
1213 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in intel_gvt_init_workload_scheduler() local
1218 gvt_dbg_core("init workload scheduler\n"); in intel_gvt_init_workload_scheduler()
1220 init_waitqueue_head(&scheduler->workload_complete_wq); in intel_gvt_init_workload_scheduler()
1223 init_waitqueue_head(&scheduler->waitq[i]); in intel_gvt_init_workload_scheduler()
1225 scheduler->thread[i] = kthread_run(workload_thread, engine, in intel_gvt_init_workload_scheduler()
1227 if (IS_ERR(scheduler->thread[i])) { in intel_gvt_init_workload_scheduler()
1229 ret = PTR_ERR(scheduler->thread[i]); in intel_gvt_init_workload_scheduler()
1741 wake_up(&workload->vgpu->gvt->scheduler.waitq[workload->engine->id]); in intel_vgpu_queue_workload()