[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <173039526970.1510316.4428336973275011540.b4-ty@google.com>
Date: Thu, 31 Oct 2024 12:51:31 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: Rework core loop of kvm_vcpu_on_spin() to use a
single for-loop
On Fri, 02 Aug 2024 13:21:21 -0700, Sean Christopherson wrote:
> Rework kvm_vcpu_on_spin() to use a single for-loop instead of making "two"
> passes over all vCPUs. Given N=kvm->last_boosted_vcpu, the logic is to
> iterate from vCPU[N+1]..vcpu[N-1], i.e. using two loops is just a kludgy
> way of handling the wrap from the last vCPU to vCPU0 when a boostable vCPU
> isn't found in vcpu[N+1]..vcpu[MAX].
>
> Open code the xa_load() instead of using kvm_get_vcpu() to avoid reading
> online_vcpus in every loop, as well as the accompanying smp_rmb(), i.e.
> make it a custom kvm_for_each_vcpu(), for all intents and purposes.
>
> [...]
Applied to kvm-x86 generic, thanks!
[1/1] KVM: Rework core loop of kvm_vcpu_on_spin() to use a single for-loop
https://github.com/kvm-x86/linux/commit/7e513617da71
--
https://github.com/kvm-x86/linux/tree/next
Powered by blists - more mailing lists