Repository navigation
Commit 379a3c8
KVM: VMX: Optimize posted-interrupt delivery for timer fastpath
While optimizing posted-interrupt delivery especially for the timer
fastpath scenario, I measured kvm_x86_ops.deliver_posted_interrupt()
to introduce substantial latency because the processor has to perform
all vmentry tasks, ack the posted interrupt notification vector,
read the posted-interrupt descriptor etc.
This is not only slow, it is also unnecessary when delivering an
interrupt to the current CPU (as is the case for the LAPIC timer) because
PIR->IRR and IRR->RVI synchronization is already performed on vmentry
Therefore skip kvm_vcpu_trigger_posted_interrupt in this case, and
instead do vmx_sync_pir_to_irr() on the EXIT_FASTPATH_REENTER_GUEST
fastpath as well.
Tested-by: Haiwei Li <lihaiwei@tencent.com>
Cc: Haiwei Li <lihaiwei@tencent.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1588055009-12677-6-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 404d5d7 commit 379a3c8
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3936 | 3936 | | |
3937 | 3937 | | |
3938 | 3938 | | |
3939 | | - | |
| 3939 | + | |
| 3940 | + | |
3940 | 3941 | | |
3941 | 3942 | | |
3942 | 3943 | | |
| |||
6812 | 6813 | | |
6813 | 6814 | | |
6814 | 6815 | | |
| 6816 | + | |
| 6817 | + | |
6815 | 6818 | | |
6816 | 6819 | | |
6817 | 6820 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4646 | 4646 | | |
4647 | 4647 | | |
4648 | 4648 | | |
| 4649 | + | |
4649 | 4650 | | |
4650 | 4651 | | |
4651 | 4652 | | |
| |||
0 commit comments