From: Roman Kagan Subject: Re: [PATCH v4 3/5] KVM: x86: hyperv: use get_vcpu_by_vpidx() in kvm_hv_flush_tlb() Date: Mon, 9 Jul 2018 21:30:34 +0300 Message-ID: <20180709183034.GC3017@rkaganb.sw.ru> References: <20180703134206.27240-1-vkuznets@redhat.com> <20180703134206.27240-4-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , Wanpeng Li , linux-kernel@vger.kernel.org To: Vitaly Kuznetsov Return-path: Content-Disposition: inline In-Reply-To: <20180703134206.27240-4-vkuznets@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Jul 03, 2018 at 03:42:04PM +0200, Vitaly Kuznetsov wrote: > VP_INDEX almost always matches VCPU id and get_vcpu_by_vpidx() is fast, > use it instead of traversing full vCPU list every time. > > To support the change split off get_vcpu_idx_by_vpidx() from > get_vcpu_by_vpidx(). > > Signed-off-by: Vitaly Kuznetsov > --- > arch/x86/kvm/hyperv.c | 78 ++++++++++++++++++++------------------------------- > 1 file changed, 31 insertions(+), 47 deletions(-) Reviewed-by: Roman Kagan