Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754876Ab2JDLAq (ORCPT ); Thu, 4 Oct 2012 07:00:46 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:58535 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754644Ab2JDLAo (ORCPT ); Thu, 4 Oct 2012 07:00:44 -0400 Message-ID: <506D6B64.6030907@linux.vnet.ibm.com> Date: Thu, 04 Oct 2012 16:26:36 +0530 From: Raghavendra K T Organization: IBM User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Avi Kivity CC: Peter Zijlstra , "H. Peter Anvin" , Marcelo Tosatti , Ingo Molnar , Rik van Riel , Srikar , "Nikunj A. Dadhania" , KVM , Jiannan Ouyang , chegu vinod , "Andrew M. Theurer" , LKML , Srivatsa Vaddagiri , Gleb Natapov , Andrew Jones Subject: Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler References: <1348486479.11847.46.camel@twins> <50604988.2030506@linux.vnet.ibm.com> <1348490165.11847.58.camel@twins> <50606050.309@linux.vnet.ibm.com> <1348494895.11847.64.camel@twins> <50606B33.1040102@linux.vnet.ibm.com> <5061B437.8070300@linux.vnet.ibm.com> <5064101A.5070902@redhat.com> <50643745.6010202@linux.vnet.ibm.com> <506440AF.9080202@redhat.com> <20121003142942.GB15253@linux.vnet.ibm.com> <506C7524.2010103@redhat.com> In-Reply-To: <506C7524.2010103@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit x-cbid: 12100410-1396-0000-0000-000001F4BC76 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2087 Lines: 60 On 10/03/2012 10:55 PM, Avi Kivity wrote: > On 10/03/2012 04:29 PM, Raghavendra K T wrote: >> * Avi Kivity [2012-09-27 14:03:59]: >> >>> On 09/27/2012 01:23 PM, Raghavendra K T wrote: >>>>> >> [...] >>>> 2) looking at the result (comparing A & C) , I do feel we have >>>> significant in iterating over vcpus (when compared to even vmexit) >>>> so We still would need undercommit fix sugested by PeterZ (improving by >>>> 140%). ? >>> >>> Looking only at the current runqueue? My worry is that it misses a lot >>> of cases. Maybe try the current runqueue first and then others. >>> >> >> Okay. Do you mean we can have something like >> >> + if (rq->nr_running == 1 && p_rq->nr_running == 1) { >> + yielded = -ESRCH; >> + goto out_irq; >> + } >> >> in the Peter's patch ? >> >> ( I thought lot about && or || . Both seem to have their own cons ). >> But that should be only when we have short term imbalance, as PeterZ >> told. > > I'm missing the context. What is p_rq? p_rq is the run queue of target vcpu. What I was trying below was to address Rik concern. Suppose rq of source vcpu has one task, but target probably has two task, with a eligible vcpu waiting to be scheduled. > > What I mean was: > > if can_yield_to_process_in_current_rq > do that > else if can_yield_to_process_in_other_rq > do that > else > return -ESRCH I think you are saying we have to check the run queue of the source vcpu, if we have a vcpu belonging to same VM and try yield to that? ignoring whatever the target vcpu we received for yield_to. Or is it that kvm_vcpu_yield_to should now check the vcpus of same vm belonging to same run queue first. If we don't succeed, go again for a vcpu in different runqueue. Does it add more overhead especially in <= 1x scenario? -- 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/