Re: [PATCH 2/2] KVM: Scalable memslots implementation

From: Paolo Bonzini
Date: Wed Feb 03 2021 - 08:45:37 EST


On 03/02/21 00:43, Sean Christopherson wrote:
But overall, this solution (and the one with id_to_index moved into the
main array, too) is still O(n) per memslot operation as you still need to
copy the array to either make space for the new memslot or to remove the
hole from the removed memslot.

Yes, but that problem that can be solved separately from the performance issue
with hva lookups.

I know the world is not just QEMU, but I'll note that in QEMU all memslot operations are roughly O(n) anyway.

Dumping everything into a single patch makes bisecting nearly worthless, e.g. if
fast hva lookups breaks a non-x86 architecture, we should able to bisect to
exactly that, not a massive patch that completely rewrites all of the memslot
code in one fell swoop.

Mega patches with multiple logical changes are also extremely difficult to
review.

Indeed. This patch does get a +1 for having associated selftests, but the diffstat puts it back at the bottom of the pile. :)

Paolo