From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wright Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2) Date: Fri, 3 Dec 2010 10:20:15 -0800 Message-ID: <20101203182015.GG10050@sequoia.sous-sol.org> References: <1291298357-5695-1-git-send-email-aliguori@us.ibm.com> <20101202191416.GQ10050@sequoia.sous-sol.org> <20101203115752.GD27994@linux.vnet.ibm.com> <20101203162731.GA11725@linux.vnet.ibm.com> <20101203172906.GD10050@sequoia.sous-sol.org> <20101203175744.GE13515@linux.vnet.ibm.com> <20101203175854.GF10050@sequoia.sous-sol.org> <4CF931D3.6000204@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris Wright , Srivatsa Vaddagiri , Anthony Liguori , kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti To: Anthony Liguori Return-path: Received: from sous-sol.org ([216.99.217.87]:34295 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753864Ab0LCSUl (ORCPT ); Fri, 3 Dec 2010 13:20:41 -0500 Content-Disposition: inline In-Reply-To: <4CF931D3.6000204@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: * Anthony Liguori (anthony@codemonkey.ws) wrote: > On 12/03/2010 11:58 AM, Chris Wright wrote: > >* Srivatsa Vaddagiri (vatsa@linux.vnet.ibm.com) wrote: > >>On Fri, Dec 03, 2010 at 09:29:06AM -0800, Chris Wright wrote: > >>>That's what Marcelo's suggestion does w/out a fill thread. > >>There's one complication though even with that. How do we compute the > >>real utilization of VM (given that it will appear to be burning 100% cycles)? > >>We need to have scheduler discount the cycles burnt post halt-exit, so more > >>stuff is needed than those simple 3-4 lines! > >Heh, was just about to say the same thing ;) > > My first reaction is that it's not terribly important to account the > non-idle time in the guest because of the use-case for this model. Depends on the chargeback model. This would put guest vcpu runtime vs host running guest vcpu time really out of skew. ('course w/out steal and that time it's already out of skew). But I think most models are more uptime based rather then actual runtime now. > Eventually, it might be nice to have idle time accounting but I > don't see it as a critical feature here. > > Non-idle time simply isn't as meaningful here as it normally would > be. If you have 10 VMs in a normal environment and saw that you had > only 50% CPU utilization, you might be inclined to add more VMs. Who is "you"? cloud user, or cloud service provider's scheduler? On the user side, 50% cpu utilization wouldn't trigger me to add new VMs. On the host side, 50% cpu utilization would have to be measure solely in terms of guest vcpu count. > But if you're offering deterministic execution, it doesn't matter if > you only have "50%" utilization. If you add another VM, the guests > will get exactly the same impact as if they were using 100% > utilization. Sorry, didn't follow here? thanks, -chris