lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1738595289.git.naveen@kernel.org>
Date: Mon,  3 Feb 2025 22:33:00 +0530
From: "Naveen N Rao (AMD)" <naveen@...nel.org>
To: <kvm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Cc: Sean Christopherson <seanjc@...gle.com>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	Vasant Hegde <vasant.hegde@....com>,
	Maxim Levitsky <mlevitsk@...hat.com>,
	Vitaly Kuznetsov <vkuznets@...hat.com>
Subject: [PATCH 0/3] KVM: x86: Address performance degradation due to APICv inhibits

When AVIC is enabled (kvm_amd avic=1), guests with kernel-irqchip=on and 
PIT in reinject mode (default configuration) show degraded performance.  
This is because even though APICv is inhibited, we see other inhibits 
being set/cleared causing contention on apicv_update_lock. Rework 
inhibit code so that apicv_update_lock is not required unless APICv 
state is changing. More details in patch 3.

In a test setup with two guests (-smp 16, -netdev tap,vhost=on, -device 
virtio-net-pci,mq=on), multiple instances of netperf TCP_RR sending 
traffic to the other guest, sar shows:

Without this patch series, kvm_amd avic=0 (default):
Average:        IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         ens2 1323407.59 1323406.87 250722.47 126654.46      0.00      0.00      0.00      0.00

Without this patch series, kvm_amd avic=1:
Average:        IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         ens2 1057711.25 1057697.51 200385.83 101225.23      0.00      0.00      0.00      0.00

We see ~20% degradation in packet rate.

With this patch series, kvm_amd avic=1:
Average:        IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         ens2 1315433.91 1315434.46 249211.99 125891.47      0.00      0.00      0.00      0.00


- Naveen



Naveen N Rao (AMD) (3):
  KVM: x86: hyper-v: Convert synic_auto_eoi_used to an atomic
  KVM: x86: Remove use of apicv_update_lock when toggling guest debug
    state
  KVM: x86: Decouple APICv activation state from apicv_inhibit_reasons

 arch/x86/include/asm/kvm_host.h |  14 ++--
 arch/x86/kvm/hyperv.c           |  17 ++---
 arch/x86/kvm/x86.c              | 125 ++++++++++++++++----------------
 3 files changed, 72 insertions(+), 84 deletions(-)


base-commit: eb723766b1030a23c38adf2348b7c3d1409d11f0
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ