]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: kvm_vm_ioctl_get_dirty_log restore "nothing dirty" optimization
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 31 Jul 2007 09:57:47 +0000 (19:57 +1000)
committerAvi Kivity <avi@qumranet.com>
Sat, 13 Oct 2007 08:18:21 +0000 (10:18 +0200)
commitd0d36de2267a1e6de9ae79be0f4e6b83b5f68b67
tree0314e24ba07b5e0f20fa5ef71e82e2481a56b3f7
parent573ef26edf09af30433f5f3c77abbc1986c02d2a
KVM: kvm_vm_ioctl_get_dirty_log restore "nothing dirty" optimization

kvm_vm_ioctl_get_dirty_log scans bitmap to see it it's all zero, but
doesn't use that information.

Avi says:
Looks like it was used to guard kvm_mmu_slot_remove_write_access();
optimizing the case where the guest just leaves the screen alone (which
it usually does, especially in benchmarks).

I'd rather reinstate that optimization.  See
0f63d0022e2ce6eb5d1a32614af006ee16ad1a0d where the damage was done.

It's pretty simple: if the bitmap is all zero, we don't need to do anything to
clean it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c