From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: [PATCH RFC 0/2] assign each vcpu an owning thread and improve yielding Date: Tue, 25 Nov 2014 17:04:07 +0100 Message-ID: <1416931449-24585-1-git-send-email-dahi@linux.vnet.ibm.com> Cc: pbonzini@redhat.com, gleb@kernel.org, jfrei@linux.vnet.ibm.com, borntraeger@de.ibm.com, cornelia.huck@de.ibm.com, dahi@linux.vnet.ibm.com To: kvm@vger.kernel.org Return-path: Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:39550 "EHLO e06smtp14.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbaKYQEQ (ORCPT ); Tue, 25 Nov 2014 11:04:16 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Nov 2014 16:04:15 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id A2EBD2190041 for ; Tue, 25 Nov 2014 16:03:46 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAPG4DUr5439952 for ; Tue, 25 Nov 2014 16:04:13 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAPG4Cma028595 for ; Tue, 25 Nov 2014 09:04:13 -0700 Sender: kvm-owner@vger.kernel.org List-ID: This series improves yielding on architectures that cannot disable preemption while entering the guest and makes the creating thread of a VCPU the owning thread and therefore the yield target when yielding to that VCPU. We should focus on the case creating thread == executing thread and therefore remove the complicated handling of PIDs involving synchronize_rcus. This way we can speed up the creation of VCPUs and directly yield to the executing vcpu threads. Please note that - in theory - all VCPU ioctls should be triggered from the same VCPU thread, so changing threads is not a scenario we should optimize. David Hildenbrand (2): KVM: don't check for PF_VCPU when yielding KVM: thread creating a vcpu is the owner of that vcpu include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 22 ++-------------------- 2 files changed, 3 insertions(+), 20 deletions(-) -- 1.8.5.5