Lines Matching refs:scheduler
134 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in try_to_schedule_next_vgpu() local
143 if (scheduler->next_vgpu == scheduler->current_vgpu) { in try_to_schedule_next_vgpu()
144 scheduler->next_vgpu = NULL; in try_to_schedule_next_vgpu()
152 scheduler->need_reschedule = true; in try_to_schedule_next_vgpu()
156 if (scheduler->current_workload[engine->id]) in try_to_schedule_next_vgpu()
161 vgpu_update_timeslice(scheduler->current_vgpu, cur_time); in try_to_schedule_next_vgpu()
162 vgpu_data = scheduler->next_vgpu->sched_data; in try_to_schedule_next_vgpu()
166 scheduler->current_vgpu = scheduler->next_vgpu; in try_to_schedule_next_vgpu()
167 scheduler->next_vgpu = NULL; in try_to_schedule_next_vgpu()
169 scheduler->need_reschedule = false; in try_to_schedule_next_vgpu()
173 wake_up(&scheduler->waitq[engine->id]); in try_to_schedule_next_vgpu()
214 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in tbs_sched_func() local
219 if (list_empty(&sched_data->lru_runq_head) || scheduler->next_vgpu) in tbs_sched_func()
224 scheduler->next_vgpu = vgpu; in tbs_sched_func()
233 scheduler->next_vgpu = gvt->idle_vgpu; in tbs_sched_func()
236 if (scheduler->next_vgpu) in tbs_sched_func()
242 struct gvt_sched_data *sched_data = gvt->scheduler.sched_data; in intel_gvt_schedule()
258 vgpu_update_timeslice(gvt->scheduler.current_vgpu, cur_time); in intel_gvt_schedule()
279 struct intel_gvt_workload_scheduler *scheduler = in tbs_sched_init() local
280 &gvt->scheduler; in tbs_sched_init()
294 scheduler->sched_data = data; in tbs_sched_init()
301 struct intel_gvt_workload_scheduler *scheduler = in tbs_sched_clean() local
302 &gvt->scheduler; in tbs_sched_clean()
303 struct gvt_sched_data *data = scheduler->sched_data; in tbs_sched_clean()
308 scheduler->sched_data = NULL; in tbs_sched_clean()
331 struct gvt_sched_data *sched_data = gvt->scheduler.sched_data; in tbs_sched_clean_vgpu()
343 struct gvt_sched_data *sched_data = vgpu->gvt->scheduler.sched_data; in tbs_sched_start_schedule()
385 gvt->scheduler.sched_ops = &tbs_schedule_ops; in intel_gvt_init_sched_policy()
386 ret = gvt->scheduler.sched_ops->init(gvt); in intel_gvt_init_sched_policy()
395 gvt->scheduler.sched_ops->clean(gvt); in intel_gvt_clean_sched_policy()
411 ret = vgpu->gvt->scheduler.sched_ops->init_vgpu(vgpu); in intel_vgpu_init_sched_policy()
420 vgpu->gvt->scheduler.sched_ops->clean_vgpu(vgpu); in intel_vgpu_clean_sched_policy()
431 vgpu->gvt->scheduler.sched_ops->start_schedule(vgpu); in intel_vgpu_start_schedule()
445 struct intel_gvt_workload_scheduler *scheduler = in intel_vgpu_stop_schedule() local
446 &vgpu->gvt->scheduler; in intel_vgpu_stop_schedule()
458 scheduler->sched_ops->stop_schedule(vgpu); in intel_vgpu_stop_schedule()
460 if (scheduler->next_vgpu == vgpu) in intel_vgpu_stop_schedule()
461 scheduler->next_vgpu = NULL; in intel_vgpu_stop_schedule()
463 if (scheduler->current_vgpu == vgpu) { in intel_vgpu_stop_schedule()
465 scheduler->need_reschedule = true; in intel_vgpu_stop_schedule()
466 scheduler->current_vgpu = NULL; in intel_vgpu_stop_schedule()
470 spin_lock_bh(&scheduler->mmio_context_lock); in intel_vgpu_stop_schedule()
472 if (scheduler->engine_owner[engine->id] == vgpu) { in intel_vgpu_stop_schedule()
474 scheduler->engine_owner[engine->id] = NULL; in intel_vgpu_stop_schedule()
477 spin_unlock_bh(&scheduler->mmio_context_lock); in intel_vgpu_stop_schedule()