hv: schedule: remove runqueue_lock in sched_context

Now sched_object and sched_context are protected by scheduler_lock. There's no
chance to use runqueue_lock to protect schedule runqueue if we have no plan to
support schedule migration.

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Li, Fei1
2019-07-09 00:17:51 +08:00
committed by ACRN System Integration
parent b1dd3e26f5
commit e69b3dcf67
3 changed files with 5 additions and 15 deletions

View File

@@ -620,7 +620,7 @@ void pause_vcpu(struct acrn_vcpu *vcpu, enum vcpu_state new_state)
vcpu->state = new_state;
if (atomic_load32(&vcpu->running) == 1U) {
remove_from_cpu_runqueue(&vcpu->sched_obj, vcpu->pcpu_id);
remove_from_cpu_runqueue(&vcpu->sched_obj);
if (is_lapic_pt_enabled(vcpu)) {
make_reschedule_request(vcpu->pcpu_id, DEL_MODE_INIT);
@@ -636,7 +636,7 @@ void pause_vcpu(struct acrn_vcpu *vcpu, enum vcpu_state new_state)
}
}
} else {
remove_from_cpu_runqueue(&vcpu->sched_obj, vcpu->pcpu_id);
remove_from_cpu_runqueue(&vcpu->sched_obj);
release_schedule_lock(vcpu->pcpu_id);
}
}