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 (v4) Date: Mon, 6 Dec 2010 19:09:52 +0530 Message-ID: <20101206133952.GE440@linux.vnet.ibm.com> References: <1291473801-23290-1-git-send-email-aliguori@us.ibm.com> <20101205165513.GC440@linux.vnet.ibm.com> <4CFCE4B6.1030705@redhat.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, Marcelo Tosatti , Chris Wright To: Avi Kivity Return-path: Received: from e32.co.us.ibm.com ([32.97.110.150]:60206 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752468Ab0LFNkA (ORCPT ); Mon, 6 Dec 2010 08:40:00 -0500 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id oB6DURTN027725 for ; Mon, 6 Dec 2010 06:30:27 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oB6Ddvxv159534 for ; Mon, 6 Dec 2010 06:39:57 -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 oB6DdudA028797 for ; Mon, 6 Dec 2010 06:39:57 -0700 Content-Disposition: inline In-Reply-To: <4CFCE4B6.1030705@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Dec 06, 2010 at 03:27:18PM +0200, Avi Kivity wrote: > >A vcpu could be idle not just because of lack of work, but also because its > >waiting on IO completion. Normally idle vcpus that yield would allow their > >companion threads to run and possibly finish pending IO work faster. Now that > >idle vcpu won't yield, it would cause overall cpu cycle demand of VMs to go up > >(100% demand from VM's idle/not-idle vcpus + whatever their companion threads > >demand) not to mention any impact on IO latencies. Not sure how much of an issue > >this will be in practice, but something to keep in mind when we test! > > It will be an issue. Anything that is latency sensitive will > suffer, since the scheduler won't prioritize completions (at least > in vcpu threads). But that only affects the average case, not the > worst case. Yeah - some testing will tell us how much of an issue this is for various workloads. > >Also, just curious how this would work for idle vcpus that use mwait rather > >than hlt. > > We don't expose mwait to the guest (emulating mwait is very expensive). We seem to be queuing an exception upon mwait (EXIT_REASON_MWAIT_INSTRUCTION being handled by a handle_invalid_op()). Does that kill the guest? - vatsa