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: Wed, 23 Sep 2009 17:09:38 +0300 Message-ID: <4ABA2C22.7020000@redhat.com> References: <4ABA2AD7.6080008@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ingo Molnar , "kvm@vger.kernel.org" To: "Zhai, Edwin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752970AbZIWOJr (ORCPT ); Wed, 23 Sep 2009 10:09:47 -0400 In-Reply-To: <4ABA2AD7.6080008@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/23/2009 05:04 PM, Zhai, Edwin wrote: > Avi, > > This is the patch to enable PLE, which depends on the a small change > of Linux scheduler > (see http://lkml.org/lkml/2009/5/20/447). > > According to our discussion last time, one missing part is that if PLE > exit, pick up an unscheduled vcpu at random and schedule it. But > further investigation found that: > 1. KVM is hard to know the schedule state for each vcpu. > 2. Linux scheduler has no existed API can be used to pull a specific > task to this cpu, so we need more changes to the common scheduler. > So I prefer current simple way: just give up current cpu time. > > If no objection, I'll try to push common scheduler change first to > linux. We haven't sorted out what is the correct thing to do here. I think we should go for a directed yield, but until we have it, you can use hrtimers to sleep for 100 microseconds and hope the holding vcpu will get scheduled. Even if it doesn't, we're only wasting a few percent cpu time instead of spinning. -- error compiling committee.c: too many arguments to function