From mboxrd@z Thu Jan 1 00:00:00 1970 From: Srivatsa Vaddagiri Subject: Re: VM performance issue in KVM guests. Date: Thu, 15 Apr 2010 09:43:13 -0700 Message-ID: <20100415164313.GF9128@linux.vnet.ibm.com> References: <4BC0D125.9050108@redhat.com> <4BC2C07B.4040607@redhat.com> <4BC6CBE3.8020207@redhat.com> <1271338398.1674.13.camel@laptop> Reply-To: vatsa@in.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Srivatsa Vaddagiri , "Zhang, Xiantao" , "kvm@vger.kernel.org" , Marcelo Tosatti , "Yang, Xiaowei" , "Dong, Eddie" , "Li, Xin" , Ingo Molnar , Mike Galbraith , Linux Kernel Mailing List To: Peter Zijlstra Return-path: Received: from e31.co.us.ibm.com ([32.97.110.149]:36031 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754799Ab0DOQnf (ORCPT ); Thu, 15 Apr 2010 12:43:35 -0400 Content-Disposition: inline In-Reply-To: <1271338398.1674.13.camel@laptop> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Apr 15, 2010 at 03:33:18PM +0200, Peter Zijlstra wrote: > On Thu, 2010-04-15 at 11:18 +0300, Avi Kivity wrote: > > > > Certainly that has even greater potential for Linux guests. Note that > > we spin on mutexes now, so we need to prevent preemption while the lock > > owner is running. > > either that, or disable spinning on (para) virt kernels. Para virt > kernels could possibly extend the thing by also checking to see if the > owner's vcpu is running. I suspect we will need a combination of both approaches, given that we will not be able to avoid preempting guests in their critical section always (too long critical sections or real-time tasks wanting to preempt). Other idea is to gang-schedule VCPUs of the same guest as much as possible? - vatsa