[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zhw62797.fsf@vitty.brq.redhat.com>
Date: Mon, 24 Sep 2018 18:24:36 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: kvm@...r.kernel.org,
Radim Krčmář <rkrcmar@...hat.com>,
Roman Kagan <rkagan@...tuozzo.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"Michael Kelley \(EOSG\)" <Michael.H.Kelley@...rosoft.com>,
Wanpeng Li <wanpeng.li@...mail.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 RESEND 3/5] KVM: x86: hyperv: use get_vcpu_by_vpidx() in kvm_hv_flush_tlb()
Vitaly Kuznetsov <vkuznets@...hat.com> writes:
> Paolo Bonzini <pbonzini@...hat.com> writes:
>
>> On 22/08/2018 12:18, 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.
>>
>> ... but if it doesn't, the algorithm is now quadratic, isn't i?
>
> Yes,
>
> I even had an implementation with a logarythmic search back in v2 but
> we had a discussion with Roman and he convinced me this is an overkill
> and not currently required. It seems that with Qemu this is true indeed,
> vp_index always matches vcpu is but in case some other userspace decides
> to break this unwritten rule users may experience significant slowdown.
Hi Paolo,
could you please clarify what needs to be done to get this merged? In
particular, are you OK with my comment above or do we need to do
something with it (e.g. get back to the 'logarythmic search' from v2)?
In kvm/queue I can see only 'x86/hyper-v: rename ipi_arg_{ex,non_ex}
structures' patch from this series applied.
Thanks,
--
Vitaly
Powered by blists - more mailing lists