From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: x86: use smp_send_reschedule in kvm_vcpu_kick Date: Thu, 12 Mar 2009 13:04:22 +0200 Message-ID: <20090312110422.GB10892@redhat.com> References: <20090303001405.GA5889@amt.cnet> <49B4ECB6.8060505@redhat.com> <20090309105855.GA14242@elte.hu> <1236596946.8389.340.camel@laptop> <20090309232350.GA6837@amt.cnet> <49B61E65.4070706@redhat.com> <706158FABBBA044BAD4FE898A02E4BC224451E95@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , Ingo Molnar , "kvm@vger.kernel.org" , Peter Zijlstra To: "Zhang, Xiantao" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44614 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753815AbZCLLIF (ORCPT ); Thu, 12 Mar 2009 07:08:05 -0400 Content-Disposition: inline In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC224451E95@pdsmsx503.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Mar 12, 2009 at 10:31:47AM +0800, Zhang, Xiantao wrote: > Avi Kivity wrote: > > Marcelo Tosatti wrote: > >> OK, reworked patch: > >> - change ia64 in addition to x86 > >> - add comment on smp send reschedule handlers about KVM's usage > >> > >> Untested on IA64. > >> > >> KVM: use smp_send_reschedule in kvm_vcpu_kick > >> > >> KVM uses a function call IPI to cause the exit of a guest running on > >> a physical cpu. For virtual interrupt notification there is no need > >> to wait on IPI receival, or to execute any function. > >> > >> This is exactly what the reschedule IPI does, without the overhead > >> of function IPI. So use it instead of smp_call_function_single in > >> kvm_vcpu_kick. > >> > >> Also change the "guest_mode" variable to a bit in vcpu->requests, and > >> use that to collapse multiple IPI's that would be issued between the > >> first one and zeroing of guest mode. > >> > >> This allows kvm_vcpu_kick to called with interrupts disabled. > >> > > > > Looks good. Will wait for Xiantao's test-n-ack before applying. > > kvm-ia64 is broken due to recent check-ins about irq-bits, and we are trying to fix it. For this patch, ia64 has to export the symbol smp_send_reschedule before applying the patch. Can you try this patch please: http://patchwork.kernel.org/patch/11103/ -- Gleb.