]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: X86: Optimize zapping rmap
authorPeter Xu <peterx@redhat.com>
Fri, 30 Jul 2021 22:06:05 +0000 (18:06 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Aug 2021 09:55:56 +0000 (05:55 -0400)
commitf85320a3eccd27b687bd34799747a13ff17e6c9b
tree360879500a6da4239f9f03dcfb6ef70a5834b1b3
parent272f19b032a3012cb9607d177cea05315a608222
KVM: X86: Optimize zapping rmap

Using rmap_get_first() and rmap_remove() for zapping a huge rmap list could be
slow.  The easy way is to travers the rmap list, collecting the a/d bits and
free the slots along the way.

Provide a pte_list_destroy() and do exactly that.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210730220605.26377-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c