From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3 0/6] Optimize vcpu->requests processing Date: Mon, 24 Sep 2012 14:12:55 +0200 Message-ID: <50604E47.4050701@redhat.com> References: <1341853545-3023-1-git-send-email-avi@redhat.com> <505FF5E3.3070101@linux.vnet.ibm.com> <50602C80.1090102@redhat.com> <506033C7.5000903@linux.vnet.ibm.com> <50603B58.5040703@redhat.com> <50604107.8020105@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754614Ab2IXMNA (ORCPT ); Mon, 24 Sep 2012 08:13:00 -0400 In-Reply-To: <50604107.8020105@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/24/2012 01:16 PM, Xiao Guangrong wrote: > On 09/24/2012 06:52 PM, Avi Kivity wrote: >> On 09/24/2012 12:19 PM, Xiao Guangrong wrote: >>> On 09/24/2012 05:48 PM, Avi Kivity wrote: >>>> On 09/24/2012 07:55 AM, Xiao Guangrong wrote: >>>>> On 07/10/2012 01:05 AM, Avi Kivity wrote: >>>>>> Currently, any time a request bit is set (not too uncommon) we check all of them. >>>>>> This patchset optimizes the process slightly by skipping over unset bits using >>>>>> for_each_set_bit(). >>>>>> >>>>> >>>>> I also notice that kvm_check_request costs lots of cpu time. What is the status >>>>> of this patchset? >>>>> >>>> >>>> I had problems getting rid of KVM_REQ_PENDING_TIMER. I'll try again. >>>> >>>> In what workloads did you see kvm_check_request()? >>>> >>> >>> Run kernbench on guest, and use perf to sample, this function is really >>> hot. >>> >> >> I don't see it at all. Westmere, 4-way guest. >> > > This is the result i got on my laptop: > > # ./perf report | grep "\[kvm\]" > 85.59% qemu-kvm [kvm] [k] arch_local_irq_enable Something's wrong here, should be inlined and certainly not take 86% of cpu time. > 0.18% qemu-kvm [kvm] [k] kvm_arch_vcpu_ioctl_run > 0.10% qemu-kvm [kvm] [k] paging64_walk_addr_generic > 0.10% qemu-kvm [kvm] [k] x86_decode_insn > 0.08% qemu-kvm [kvm] [k] kvm_check_request 0.08% is hardly hot. > 0.06% qemu-kvm [kvm] [k] apic_clear_vector > > My box: i5-2540M CPU @ 2.60GHz * 4 + 4G > guest: 2 vcpu + 1G > -- error compiling committee.c: too many arguments to function