From mboxrd@z Thu Jan 1 00:00:00 1970 From: Srivatsa Vaddagiri Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2) Date: Fri, 3 Dec 2010 21:57:31 +0530 Message-ID: <20101203162731.GA11725@linux.vnet.ibm.com> References: <1291298357-5695-1-git-send-email-aliguori@us.ibm.com> <20101202191416.GQ10050@sequoia.sous-sol.org> <20101203115752.GD27994@linux.vnet.ibm.com> Reply-To: vatsa@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Anthony Liguori , kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti To: Chris Wright Return-path: Received: from e36.co.us.ibm.com ([32.97.110.154]:41892 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549Ab0LCQ1k (ORCPT ); Fri, 3 Dec 2010 11:27:40 -0500 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e36.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id oB3GN63I021095 for ; Fri, 3 Dec 2010 09:23:06 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oB3GRdaV119226 for ; Fri, 3 Dec 2010 09:27:39 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oB3GRdOU003890 for ; Fri, 3 Dec 2010 09:27:39 -0700 Content-Disposition: inline In-Reply-To: <20101203115752.GD27994@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Dec 03, 2010 at 05:27:52PM +0530, Srivatsa Vaddagiri wrote: > On Thu, Dec 02, 2010 at 11:14:16AM -0800, Chris Wright wrote: > > Perhaps it should be a VM level option. And then invert the notion. > > Create one idle domain w/out hlt trap. Give that VM a vcpu per pcpu > > (pin in place probably). And have that VM do nothing other than hlt. > > Then it's always runnable according to scheduler, and can "consume" the > > extra work that CFS wants to give away. > > That's not sufficient. Lets we have 3 guests A, B, C that need to be rate > limited to 25% on a single cpu system. We create this idle guest D that is 100% > cpu hog as per above definition. Now when one of the guest is idle, what ensures > that the idle cycles of A is given only to D and not partly to B/C? To tackle this problem, I was thinking of having a fill-thread associated with each vcpu (i.e both belong to same cgroup). Fill-thread consumes idle cycles left by vcpu, but otherwise doesn't compete with it for cycles. - vatsa