All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>, linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, Christian Borntraeger <borntraeger@de.ibm.com>
Subject: Re: [PATCH v3 0/5] KVM: optimize userspace exits with a new ioctl
Date: Sat, 15 Aug 2015 01:37:48 +0200	[thread overview]
Message-ID: <55CE7BCC.5090308@redhat.com> (raw)
In-Reply-To: <1439546917-17391-1-git-send-email-rkrcmar@redhat.com>



On 14/08/2015 12:08, Radim Krčmář wrote:
> v3:
>  * acked by Christian [1/5]
>  * use ioctl argument directly (unsigned long as flags) [4/5]
>  * precisely #ifdef arch-specific ioctls [5/5]
> v2:
>  * move request_exits debug counter patch right after introduction of
>    KVM_REQ_EXIT [3/5]
>  * use vcpu ioctl instead of vm one [4/5]
>  * shrink kvm_user_exit from 64 to 32 bytes [4/5]
>  * new [5/5]
> 
> QEMU uses SIGUSR1 to force a userspace exit and also to queue an early
> exit before calling VCPU_RUN -- the signal is blocked in user space and
> temporarily unblocked in VCPU_RUN.
> The temporal unblocking by sigprocmask() in kvm_arch_vcpu_ioctl_run()
> takes a shared siglock, which leads to cacheline bouncing in NUMA
> systems.
> 
> This series allows the same with a new request bit and VM IOCTL that
> marks and kicks target VCPU, hence no need to unblock.
> 
> inl_from_{pmtimer,qemu} vmexit benchmark from kvm-unit-tests shows ~5%
> speedup for 1-4 VCPUs (300-2000 saved cycles) without noticeably
> regressing kernel VM exits.
> (Paolo did a quick run of older version of this series on a NUMA system
>  and the speedup was around 35% when utilizing more nodes.)
> 
> Radim Krčmář (5):
>   KVM: add kvm_has_request wrapper
>   KVM: add KVM_REQ_EXIT request for userspace exit
>   KVM: x86: add request_exits debug counter
>   KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit
>   KVM: refactor asynchronous vcpu ioctl dispatch
> 
>  Documentation/virtual/kvm/api.txt | 25 +++++++++++++++++++++++++
>  arch/x86/include/asm/kvm_host.h   |  1 +
>  arch/x86/kvm/vmx.c                |  4 ++--
>  arch/x86/kvm/x86.c                | 23 +++++++++++++++++++++++
>  include/linux/kvm_host.h          | 15 +++++++++++++--
>  include/uapi/linux/kvm.h          |  4 ++++
>  virt/kvm/kvm_main.c               | 15 ++++++++++-----
>  7 files changed, 78 insertions(+), 9 deletions(-)
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

... however, we still need to decide what to do about machine-check
exceptions before enabling the capability, otherwise we'd need a new
KVM_CAP_USER_EXIT_MCE capability in the future.  So I'm holding up the
patches for now.

Paolo

  parent reply	other threads:[~2015-08-14 23:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14 10:08 [PATCH v3 0/5] KVM: optimize userspace exits with a new ioctl Radim Krčmář
2015-08-14 10:08 ` [PATCH v3 1/5] KVM: add kvm_has_request wrapper Radim Krčmář
2015-08-14 10:08 ` [PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit Radim Krčmář
2015-08-20  3:55   ` Wanpeng Li
2015-08-22  7:04     ` Paolo Bonzini
2015-08-14 10:08 ` [PATCH v3 3/5] KVM: x86: add request_exits debug counter Radim Krčmář
2015-08-14 10:08 ` [PATCH v3 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit Radim Krčmář
2015-08-14 10:08 ` [PATCH v3 5/5] KVM: refactor asynchronous vcpu ioctl dispatch Radim Krčmář
2015-08-14 23:37 ` Paolo Bonzini [this message]
2015-09-02 10:31 ` [PATCH v3 0/5] KVM: optimize userspace exits with a new ioctl Christian Borntraeger
2015-09-07 12:33   ` Paolo Bonzini

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=55CE7BCC.5090308@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.