• R/O
  • HTTP
  • SSH
  • HTTPS

tomoyo-test1: コミット

This is a test repository.


コミットメタ情報

リビジョンe1be9ac8e6014a9b0a216aebae7250f9863e9fc3 (tree)
日時2020-03-26 18:44:21
作者Wanpeng Li <wanpengli@tenc...>
コミッターPaolo Bonzini

ログメッセージ

KVM: X86: Narrow down the IPI fastpath to single target IPI

The original single target IPI fastpath patch forgot to filter the
ICR destination shorthand field. Multicast IPI is not suitable for
this feature since wakeup the multiple sleeping vCPUs will extend
the interrupt disabled time, it especially worse in the over-subscribe
and VM has a little bit more vCPUs scenario. Let's narrow it down to
single target IPI.

Two VMs, each is 76 vCPUs, one running 'ebizzy -M', the other
running cyclictest on all vCPUs, w/ this patch, the avg score
of cyclictest can improve more than 5%. (pv tlb, pv ipi, pv
sched yield are disabled during testing to avoid the disturb).

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1585189202-1708-3-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

変更サマリ

差分

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1554,7 +1554,10 @@ EXPORT_SYMBOL_GPL(kvm_emulate_wrmsr);
15541554 */
15551555 static int handle_fastpath_set_x2apic_icr_irqoff(struct kvm_vcpu *vcpu, u64 data)
15561556 {
1557- if (lapic_in_kernel(vcpu) && apic_x2apic_mode(vcpu->arch.apic) &&
1557+ if (!lapic_in_kernel(vcpu) || !apic_x2apic_mode(vcpu->arch.apic))
1558+ return 1;
1559+
1560+ if (((data & APIC_SHORT_MASK) == APIC_DEST_NOSHORT) &&
15581561 ((data & APIC_DEST_MASK) == APIC_DEST_PHYSICAL) &&
15591562 ((data & APIC_MODE_MASK) == APIC_DM_FIXED)) {
15601563
旧リポジトリブラウザで表示