Changeset View
Standalone View
sys/amd64/vmm/vmm.c
Show First 20 Lines • Show All 1,690 Lines • ▼ Show 20 Lines | vm_exit_debug(struct vm *vm, int vcpuid, uint64_t rip) | ||||
vmexit->exitcode = VM_EXITCODE_DEBUG; | vmexit->exitcode = VM_EXITCODE_DEBUG; | ||||
} | } | ||||
void | void | ||||
vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip) | vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip) | ||||
{ | { | ||||
struct vm_exit *vmexit; | struct vm_exit *vmexit; | ||||
KASSERT(vm->rendezvous_func != NULL, ("rendezvous not in progress")); | |||||
gusev.vitaliy_gmail.com: Correct me if I am wrong, vm_handle_rendezvous() will set all threads sleeping even if thread… | |||||
corvinkAuthorUnsubmitted Not Done Inline ActionsYes, that's true but it's only a performance issue. Additionally, if vm_handle_rendezvous wouldn't set the thread to sleep, the thread calls vm_run again, notices that a rendezvous is still in progress and enters vm_handle_rendezvous again. IMHO sleeping is better than looping. corvink: Yes, that's true but it's only a performance issue. Additionally, if vm_handle_rendezvous… | |||||
gusev.vitaliy_gmail.comUnsubmitted Not Done Inline ActionsThat's fine. I guess that info about sleeping should be added in commit message. Currently it has just mention "... vm_handle_rendezvous properly handles a spurious rendezvous". gusev.vitaliy_gmail.com: That's fine. I guess that info about sleeping should be added in commit message. Currently it… | |||||
jhbUnsubmitted Not Done Inline ActionsKeep in mind the places where rendezvouses are used. The INIT IPIs are only used during bootup and are not perf critical. The other use case is for dealing with level triggered I/O APIC interrupts and those rendezvous always go to all vCPUs, so you won't get spurious sleeping vCPUs for those. Given that, I don't think the spurious sleeps are worth worrying about. jhb: Keep in mind the places where rendezvouses are used. The INIT IPIs are only used during bootup… | |||||
vmexit = vm_exitinfo(vm, vcpuid); | vmexit = vm_exitinfo(vm, vcpuid); | ||||
vmexit->rip = rip; | vmexit->rip = rip; | ||||
vmexit->inst_length = 0; | vmexit->inst_length = 0; | ||||
vmexit->exitcode = VM_EXITCODE_RENDEZVOUS; | vmexit->exitcode = VM_EXITCODE_RENDEZVOUS; | ||||
vmm_stat_incr(vm, vcpuid, VMEXIT_RENDEZVOUS, 1); | vmm_stat_incr(vm, vcpuid, VMEXIT_RENDEZVOUS, 1); | ||||
} | } | ||||
void | void | ||||
▲ Show 20 Lines • Show All 1,268 Lines • Show Last 20 Lines |
Correct me if I am wrong, vm_handle_rendezvous() will set all threads sleeping even if thread VCPU is not in dest (rendezvous_req_cpus) ?