From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler Date: Fri, 28 Sep 2012 19:41:22 +0530 Message-ID: <5065B00A.4050107@linux.vnet.ibm.com> References: <20120921115942.27611.67488.sendpatchset@codeblue> <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> <506537C7.9070909@linux.vnet.ibm.com> <1348832438.5551.5.camel@oc6622382223.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Peter Zijlstra , "H. Peter Anvin" , Marcelo Tosatti , Ingo Molnar , Rik van Riel , Srikar , "Nikunj A. Dadhania" , KVM , Jiannan Ouyang , chegu vinod , LKML , Srivatsa Vaddagiri , Gleb Natapov , Andrew Jones To: habanero@linux.vnet.ibm.com Return-path: In-Reply-To: <1348832438.5551.5.camel@oc6622382223.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/28/2012 05:10 PM, Andrew Theurer wrote: > On Fri, 2012-09-28 at 11:08 +0530, Raghavendra K T wrote: >> On 09/27/2012 05:33 PM, Avi Kivity wrote: >>> On 09/27/2012 01:23 PM, Raghavendra K T wrote: >>>>> [...] >>> >>> Also there may be a lot of false positives (deferred preemptions even >>> when there is no contention). > > It will be interesting to see how this behaves with a very high lock > activity in a guest. Once the scheduler defers preemption, is it for a > fixed amount of time, or does it know to cut the deferral short as soon > as the lock depth is reduced [by x]? Design/protocol that Vatsa, had in mind was something like this: - scheduler does not give a vcpu holding lock forever, it may give one chance that would give only few ticks. In addition to giving chance, scheduler also sets some indication that he has been given chance. - vcpu once he release (all) the lock(s), if it had given chance, it should clear that (ACK), and relinquish the cpu.