From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH RFC 0/2] assign each vcpu an owning thread and improve yielding Date: Wed, 03 Dec 2014 13:54:03 +0100 Message-ID: <547F07EB.4080807@redhat.com> References: <1416931449-24585-1-git-send-email-dahi@linux.vnet.ibm.com> <20141203131215.695a3ab7@thinkpad-w530> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, gleb@kernel.org, jfrei@linux.vnet.ibm.com, borntraeger@de.ibm.com, cornelia.huck@de.ibm.com To: David Hildenbrand Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752523AbaLCMyP (ORCPT ); Wed, 3 Dec 2014 07:54:15 -0500 In-Reply-To: <20141203131215.695a3ab7@thinkpad-w530> Sender: kvm-owner@vger.kernel.org List-ID: On 03/12/2014 13:12, David Hildenbrand wrote: >> 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(-) >> > > Hi Paolo, > > would be good if you could have a look at these patches. Sure. I think patch 1 is fine and I am applying it. For patch 2, what about moving the ->pid assignment in the KVM_RUN case of kvm_vcpu_ioctl? Paolo