From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [PATCH RFC] KVM: busy-spin detector Date: Fri, 11 Jun 2010 19:36:34 +0530 Message-ID: <20100611140634.GI5191@balbir.in.ibm.com> References: <20100611022551.GA16223@amt.cnet> Reply-To: balbir@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: kvm To: Marcelo Tosatti Return-path: Received: from e39.co.us.ibm.com ([32.97.110.160]:37986 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861Ab0FKOHC (ORCPT ); Fri, 11 Jun 2010 10:07:02 -0400 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e39.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o5BDvscp011477 for ; Fri, 11 Jun 2010 07:57:54 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5BE6hi9122452 for ; Fri, 11 Jun 2010 08:06:44 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5BE6fJY009441 for ; Fri, 11 Jun 2010 08:06:41 -0600 Content-Disposition: inline In-Reply-To: <20100611022551.GA16223@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: * Marcelo Tosatti [2010-06-10 23:25:51]: > > The following patch implements a simple busy-spin detector. It considers > a vcpu as busy-spinning if there are two consecutive exits due to > external interrupt on the same RIP, and sleeps for 100us in that case. > > It is very likely that if the vcpu is making progress it will either > exit for other reasons or change RIP. > > The percentage numbers below represent improvement in kernel build > time in comparison with mainline (RHEL 5.4 guest). > Interesting approach, is there a reason to tie it in with pause loop exits? Can't we do something more generic or even para-virtish. -- Three Cheers, Balbir