Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752061AbbHENYV (ORCPT ); Wed, 5 Aug 2015 09:24:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33694 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbbHENYT (ORCPT ); Wed, 5 Aug 2015 09:24:19 -0400 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, Paolo Bonzini Subject: [PATCH 0/5] KVM: optimize userspace exits with a new ioctl Date: Wed, 5 Aug 2015 15:21:12 +0200 Message-Id: <1438780877-31838-1-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1698 Lines: 41 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: add KVM_USER_EXIT vm ioctl for userspace exit KVM: optimize common cases in KVM_USER_EXIT KVM: x86: add request_exits debug counter Documentation/virtual/kvm/api.txt | 30 ++++++++++++++++++++++++++++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx.c | 4 ++-- arch/x86/kvm/x86.c | 9 +++++++++ include/linux/kvm_host.h | 15 ++++++++++++-- include/uapi/linux/kvm.h | 9 +++++++++ virt/kvm/kvm_main.c | 41 ++++++++++++++++++++++++++++++++++++++- 7 files changed, 104 insertions(+), 5 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/