]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Minor memory slot optimization
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 10 Dec 2012 17:33:03 +0000 (10:33 -0700)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 14 Dec 2012 01:21:53 +0000 (23:21 -0200)
commit103d44bd0689e97ec6f33612085973997eb9bbd2
tree7b325611705e6293ce1fe3c87eeeb30746e2fe0e
parent43272d6f380602e5f9a8434abd196a16582e650e
KVM: Minor memory slot optimization

If a slot is removed or moved in the guest physical address space, we
first allocate and install a new slot array with the invalidated
entry.  The old array is then freed.  We then proceed to allocate yet
another slot array to install the permanent replacement.  Re-use the
original array when this occurs and avoid the extra kfree/kmalloc.

Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c