public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Paul Mackerras <paulus@samba.org>,
	kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Eric Auger <eric.auger@linaro.org>
Subject: Re: [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS
Date: Wed, 06 Aug 2014 14:35:29 +0200	[thread overview]
Message-ID: <53E22111.3040902@redhat.com> (raw)
In-Reply-To: <53E0CD99.9020906@redhat.com>

Il 05/08/2014 14:27, Paolo Bonzini ha scritto:
> Il 30/06/2014 12:51, Paul Mackerras ha scritto:
>> This series of patches provides a way to implement IRQFD support
>> without having to implement IRQ routing, and adds IRQFD support for
>> the XICS interrupt controller emulation.  (XICS is the interrupt
>> controller defined for the pSeries machine type, used on IBM POWER
>> servers).
>>
>> The basic approach is to make it easy for code other than irqchip.c to
>> provide a mapping from a global interrupt number (GSI) to an irq
>> routing entry (struct kvm_kernel_irq_routing_entry).  To make the
>> lifetime of this routing entry easier to manage, we change the IRQFD
>> code to keep a copy of the routing entry (for the MSI fast-path case)
>> rather than a pointer to the routing entry.  Since the copy can't be
>> updated atomically, we add a seqcount_t to make sure that when reading
>> it we get a copy that hasn't been half-way updated.
>>
>> Next we replace the hard-coded accesses outside irqchip.c to the
>> fields of the kvm_irq_routing_table struct with calls to accessor
>> functions in irqchip.c, namely kvm_irq_map_gsi() and
>> kvm_irq_map_chip_pin().  That enables us to move all references to the
>> kvm_irq_routing_table struct, and the definition of that struct, into
>> irqchip.c.
>>
>> Then we move the irq notifier implementation from irqchip.c into
>> eventfd.c and add a separate Kconfig option to enable IRQFD.  With
>> that we can enable IRQFD without irq routing, which we achieve by
>> compiling in eventfd.c but not irqchip.c, and providing an alternative
>> implementation of kvm_irq_map_gsi() and kvm_irq_map_chip_pin().
>>
>> The last patch does that for XICS.  With this series I can use
>> vhost-net with KVM guests, and I see the TCP bandwidth between guest
>> and host on a POWER8 machine go from around 700MB/s to over 2GB/s.
>>
>> I would like to see this go into 3.17.
>>
>>  arch/ia64/kvm/Kconfig                |   1 +
>>  arch/powerpc/kvm/Kconfig             |   3 +
>>  arch/powerpc/kvm/book3s_hv_rm_xics.c |   5 ++
>>  arch/powerpc/kvm/book3s_xics.c       |  55 +++++++++++---
>>  arch/powerpc/kvm/book3s_xics.h       |   2 +
>>  arch/powerpc/kvm/mpic.c              |   4 +-
>>  arch/s390/kvm/Kconfig                |   1 +
>>  arch/s390/kvm/interrupt.c            |   3 +-
>>  arch/x86/kvm/Kconfig                 |   1 +
>>  include/linux/kvm_host.h             |  43 ++++-------
>>  virt/kvm/Kconfig                     |   3 +
>>  virt/kvm/eventfd.c                   | 134 ++++++++++++++++++++++++++---------
>>  virt/kvm/irq_comm.c                  |  24 +++----
>>  virt/kvm/irqchip.c                   |  98 ++++++++++---------------
>>  virt/kvm/kvm_main.c                  |   2 +-
>>  15 files changed, 227 insertions(+), 152 deletions(-)
>>
> 
> Applied for 3.17, thanks Eric and Cornelia for testing.
> 
> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

This doesn't build without CONFIG_KVM_XICS, so I had to apply a fixup
patch to move some code from being under CONFIG_HAVE_KVM_IRQCHIP or
unconditional, to being conditional on CONFIG_HAVE_KVM_IRQFD.  I'll send
the patch shortly.

Also, please look into adding a trace_kvm_set_irq call to kvm_set_irq in
arch/powerpc/kvm/book3s_xics.c.

I would have preferred these snags to be fixed before (especially since
the breakage is simply with "make ppc64_defconfig"), but it's partly my
fault for delaying the review for so long.  And the series is good work
and a very nice cleanup of the irqfd architecture.

Assuming that the linux-next merge from tomorrow is fine, I'll send the
second pull request to Linus.

Paolo

  reply	other threads:[~2014-08-06 12:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 10:51 [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS Paul Mackerras
2014-06-30 10:51 ` [PATCH 1/6] KVM: Don't keep reference to irq routing table in irqfd struct Paul Mackerras
2014-06-30 10:51 ` [PATCH 2/6] KVM: irqchip: Provide and use accessors for irq routing table Paul Mackerras
2014-06-30 10:51 ` [PATCH 3/6] KVM: Move all accesses to kvm::irq_routing into irqchip.c Paul Mackerras
2014-06-30 10:51 ` [PATCH 4/6] KVM: Move irq notifier implementation into eventfd.c Paul Mackerras
2014-06-30 10:51 ` [PATCH 5/6] KVM: Give IRQFD its own separate enabling Kconfig option Paul Mackerras
2014-06-30 10:51 ` [PATCH 6/6] KVM: PPC: Enable IRQFD support for the XICS interrupt controller Paul Mackerras
2014-06-30 12:43 ` [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS Alexander Graf
2014-06-30 21:25   ` Paul Mackerras
2014-07-13 22:30 ` Paul Mackerras
2014-07-14 14:18 ` Cornelia Huck
2014-07-24 15:47   ` Eric Auger
2014-08-05 12:27 ` Paolo Bonzini
2014-08-06 12:35   ` Paolo Bonzini [this message]
2014-08-07  9:49     ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E22111.3040902@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=eric.auger@linaro.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox