From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH v2 0/2] KVM: Yield CPU when vcpu executes a WFE Date: Wed, 09 Oct 2013 14:42:45 +0530 Message-ID: <52551E0D.6040004@linux.vnet.ibm.com> References: <1381253894-18114-1-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Christoffer Dall To: Marc Zyngier Return-path: Received: from e28smtp03.in.ibm.com ([122.248.162.3]:47915 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753401Ab3JIJM6 (ORCPT ); Wed, 9 Oct 2013 05:12:58 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 Oct 2013 14:42:54 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 27EF61258059 for ; Wed, 9 Oct 2013 14:43:13 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r999CljC44892174 for ; Wed, 9 Oct 2013 14:42:47 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r999CmJV026588 for ; Wed, 9 Oct 2013 14:42:49 +0530 In-Reply-To: <1381253894-18114-1-git-send-email-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/08/2013 11:08 PM, Marc Zyngier wrote: > This is a respin of a patch I posted a long while ago, this time with > numbers that I hope to be convincing enough. > > The basic idea is that spinning on WFE in a guest is a waste of > resource, and that we're better of running another vcpu instead. This > specially shows when the system is oversubscribed. The guest vcpus can > be seen spinning, waiting for a lock to be released while the lock > holder is nowhere near a physical CPU. > > This patch series just enables WFE trapping on both ARM and arm64, and > calls kvm_vcpu_on_spin(). This is enough to boost other vcpus, and > dramatically reduce the overhead. > > Branch available at: > git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/wfe-trap > > Changes from v1: > - Added CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT, as it seems to give > slightly better results (Thanks to Raghavendra K T) > - Updated commit message with results of 8x configuration > > Marc Zyngier (2): > ARM: KVM: Yield CPU when vcpu executes a WFE > arm64: KVM: Yield CPU when vcpu executes a WFE Using PLE handler and enabling CPU_RELAX_INTERCEPT part of the patches looks fine.