Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501128 > unrolled thread

[PATCH 0/5] KVM: x86: cleanup and minimal speedup for APICv

Started byPaolo Bonzini <pbonzini@redhat.com>
First post2016-10-14 20:30 +0200
Last post2016-10-27 00:00 +0200
Articles 1 on this page of 21 — 6 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] KVM: x86: cleanup and minimal speedup for APICv Paolo Bonzini <pbonzini@redhat.com> - 2016-10-14 20:30 +0200
    [PATCH 3/5] KVM: x86: do not use KVM_REQ_EVENT for APICv interrupt injection Paolo Bonzini <pbonzini@redhat.com> - 2016-10-14 20:30 +0200
      Re: [PATCH 3/5] KVM: x86: do not use KVM_REQ_EVENT for APICv  interrupt injection Radim Krčmář <rkrcmar@redhat.com> - 2016-10-26 22:10 +0200
    [PATCH 2/5] KVM: x86: do not scan IRR twice on APICv vmentry Paolo Bonzini <pbonzini@redhat.com> - 2016-10-14 20:30 +0200
      Re: [PATCH 2/5] KVM: x86: do not scan IRR twice on APICv vmentry Wanpeng Li <kernellwp@gmail.com> - 2016-10-18 08:10 +0200
      Re: [PATCH 2/5] KVM: x86: do not scan IRR twice on APICv vmentry Radim Krčmář <rkrcmar@redhat.com> - 2016-10-26 22:00 +0200
    [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Paolo Bonzini <pbonzini@redhat.com> - 2016-10-14 20:30 +0200
      Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Paolo Bonzini <pbonzini@redhat.com> - 2016-10-14 21:00 +0200
        Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Nadav Amit <nadav.amit@gmail.com> - 2016-10-14 21:50 +0200
          Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Paolo Bonzini <pbonzini@redhat.com> - 2016-10-15 09:50 +0200
            Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry "Michael S. Tsirkin" <mst@redhat.com> - 2016-10-16 04:40 +0200
              Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-10-19 20:00 +0200
                Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry "Michael S. Tsirkin" <mst@redhat.com> - 2016-10-27 00:00 +0200
      Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Nadav Amit <nadav.amit@gmail.com> - 2016-10-14 21:00 +0200
      Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry "Michael S. Tsirkin" <mst@redhat.com> - 2016-10-16 05:30 +0200
        Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Paolo Bonzini <pbonzini@redhat.com> - 2016-10-17 13:10 +0200
      Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry Radim Krčmář <rkrcmar@redhat.com> - 2016-10-26 22:00 +0200
        Re: [PATCH 1/5] KVM: x86: avoid atomic operations on APICv vmentry "Michael S. Tsirkin" <mst@redhat.com> - 2016-10-26 23:50 +0200
    [PATCH 5/5] KVM: vmx: clear pending interrupts on KVM_SET_LAPIC Paolo Bonzini <pbonzini@redhat.com> - 2016-10-14 20:30 +0200
      Re: [PATCH 5/5] KVM: vmx: clear pending interrupts on KVM_SET_LAPIC Radim Krčmář <rkrcmar@redhat.com> - 2016-10-26 22:10 +0200
    Re: [PATCH 0/5] KVM: x86: cleanup and minimal speedup for APICv "Michael S. Tsirkin" <mst@redhat.com> - 2016-10-27 00:00 +0200

Page 2 of 2 — ← Prev page 1 [2]


#1509882

From"Michael S. Tsirkin" <mst@redhat.com>
Date2016-10-27 00:00 +0200
Message-ID<swEoN-153-9@gated-at.bofh.it>
In reply to#1501128
On Fri, Oct 14, 2016 at 08:21:26PM +0200, Paolo Bonzini wrote:
> On some benchmarks (e.g. netperf with ioeventfd disabled), APICv
> posted interrupts turn out to be slower than interrupt injection via
> KVM_REQ_EVENT.
> 
> These patches save 40 cycles on kvm-unit-tests "inl" tests (1-2%), but I
> suspect the effect is bigger on workloads that inject interrupts heavily.
> 
> Patches 1-2 are micro-optimization of the APICv vmentry code.
> 
> The interesting one is patch 3.  The aim is for APICv to not use
> KVM_REQ_EVENT at all for interrupts, therefore turning APICv's weakness
> (having to look at PIR on every vmentry) into a strength (because
> checking PIR.ON is cheaper than processing KVM_REQ_EVENT).  I find that
> the new code overall makes more sense than the old one, and I like that
> more of the logic is contained within vmx_deliver_posted_interrupt and
> vmx_sync_pir_to_irr.  KVM_REQ_EVENT did protect from mistakes, so the new
> code is more delicate, but I still prefer that to duct tape. :)
> 
> Patches 4 and 5 are other cleanups.

FWIW, series

Acked-by: Michael S. Tsirkin <mst@redhat.com>

I still think we should make pir volatile but we
can argue about that later.

> Paolo
> 
> Paolo Bonzini (5):
>   KVM: x86: avoid atomic operations on APICv vmentry
>   KVM: x86: do not scan IRR twice on APICv vmentry
>   KVM: x86: do not use KVM_REQ_EVENT for APICv interrupt injection
>   KVM: x86: remove unnecessary sync_pir_to_irr
>   KVM: vmx: clear pending interrupts on KVM_SET_LAPIC
> 
>  arch/x86/kvm/lapic.c | 45 +++++++++++++++++++++++++++++----------------
>  arch/x86/kvm/lapic.h |  4 ++--
>  arch/x86/kvm/vmx.c   | 44 ++++++++++++++++++++++++++++++++------------
>  arch/x86/kvm/x86.c   | 45 +++++++++++++++++++++++++--------------------
>  4 files changed, 88 insertions(+), 50 deletions(-)
> 
> -- 
> 1.8.3.1

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web