kvm: memslots: track id_to_index changes during the insertion sort
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Nov 2014 09:22:07 +0000 (10:22 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Nov 2014 14:40:17 +0000 (15:40 +0100)
commit8593176c677226ead5b4effbd667dd19d5cba5ea
tree0aa19b0576aa4a4b2de33293e73a842a8ec70b9a
parent063584d44377ebde5ebc6e99cedc1bc6561939d7
kvm: memslots: track id_to_index changes during the insertion sort

This completes the optimization from the previous patch, by
removing the KVM_MEM_SLOTS_NUM-iteration loop from insert_memslot.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c