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: Sat, 4 Dec 2010 11:13:48 +0530 Message-ID: <20101204054348.GG13515@linux.vnet.ibm.com> References: <1291298357-5695-1-git-send-email-aliguori@us.ibm.com> <20101202191416.GQ10050@sequoia.sous-sol.org> <20101202204016.GB31316@amt.cnet> <4CF973F0.7010409@codemonkey.ws> Reply-To: vatsa@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Marcelo Tosatti , Chris Wright , kvm@vger.kernel.org, Avi Kivity To: Anthony Liguori Return-path: Received: from e6.ny.us.ibm.com ([32.97.182.146]:42502 "EHLO e6.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014Ab0LDFnx (ORCPT ); Sat, 4 Dec 2010 00:43:53 -0500 Received: from d01dlp01.pok.ibm.com (d01dlp01.pok.ibm.com [9.56.224.56]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oB45j9NE004983 for ; Sat, 4 Dec 2010 00:45:09 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 78D2E728042 for ; Sat, 4 Dec 2010 00:43:52 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oB45hqxR353554 for ; Sat, 4 Dec 2010 00:43:52 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oB45hprG010156 for ; Sat, 4 Dec 2010 03:43:52 -0200 Content-Disposition: inline In-Reply-To: <4CF973F0.7010409@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Dec 03, 2010 at 04:49:20PM -0600, Anthony Liguori wrote: > default_idle() is not exported to modules and is not an interface > meant to be called directly. Plus, an idle loop like this delays > the guest until the scheduler wants to run something else but it > doesn't account for another thread trying to inject an event into > the halting thread. It's not immediately clear to me how to have > what's effectively a wait queue that hlts instead of calls the > scheduler. You could mess around with various signalling mechanisms > but it gets ugly fast. How about using MWAIT? - vatsa