From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] [RESEND] KVM:VMX: Add support for Pause-Loop Exiting Date: Tue, 29 Sep 2009 18:46:29 +0200 Message-ID: <4AC239E5.7070709@redhat.com> References: <4ABA2AD7.6080008@intel.com> <4ABA2C22.7020000@redhat.com> <20090925204339.GA29634@8bytes.org> <4ABF22D9.3040308@redhat.com> <20090927134650.GC29634@8bytes.org> <4ABF6D0B.8080603@redhat.com> <20090927140752.GD29634@8bytes.org> <4ABF7418.2000404@redhat.com> <20090927145338.GF29634@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Zhai, Edwin" , Ingo Molnar , "kvm@vger.kernel.org" To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51814 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbZI2Qqn (ORCPT ); Tue, 29 Sep 2009 12:46:43 -0400 In-Reply-To: <20090927145338.GF29634@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: On 09/27/2009 04:53 PM, Joerg Roedel wrote: > > >> Depends. If it's a global yield(), yes. If it's a local yield() that >> doesn't rebalance the runqueues we might be left with the spinning task >> re-running. >> > Only one runable task on each cpu is unlikely in a situation of high > vcpu overcommit (where pause filtering matters). > > I think even 2:1 overcommit can degrade performance terribly. >> Also, if yield means "give up the reminder of our timeslice", then we >> potentially end up sleeping a much longer random amount of time. If we >> yield to another vcpu in the same guest we might not care, but if we >> yield to some other guest we're seriously penalizing ourselves. >> > I agree that a directed yield with possible rebalance would be good to > have, but this is very intrusive to the scheduler code and I think we > should at least try if this simpler approach already gives us good > results. > No objection to trying. I'd like to see hrtimer sleep as a baseline since it doesn't require any core changes, and we can play with it as we add more core infrastructure: - not sleeping if all vcpus are running - true yield() instead of sleep - directed yield - cross cpu directed yield -- error compiling committee.c: too many arguments to function