kernel-ark/arch/x86/kvm
Takuya Yoshikawa 95d4c16ce7 KVM: Optimize dirty logging by rmap_write_protect()
Currently, write protecting a slot needs to walk all the shadow pages
and checks ones which have a pte mapping a page in it.

The walk is overly heavy when dirty pages in that slot are not so many
and checking the shadow pages would result in unwanted cache pollution.

To mitigate this problem, we use rmap_write_protect() and check only
the sptes which can be reached from gfns marked in the dirty bitmap
when the number of dirty pages are less than that of shadow pages.

This criterion is reasonable in its meaning and worked well in our test:
write protection became some times faster than before when the ratio of
dirty pages are low and was not worse even when the ratio was near the
criterion.

Note that the locking for this write protection becomes fine grained.
The reason why this is safe is descripted in the comments.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-27 11:17:20 +02:00
..
emulate.c KVM: x86: retry non-page-table writing instructions 2011-12-27 11:16:50 +02:00
i8254.c KVM: x86: Prevent starting PIT timers in the absence of irqchip support 2011-12-25 17:13:18 +02:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: Clean up and extend rate-limited output 2011-09-25 19:52:43 +03:00
irq.c
irq.h KVM: Intelligent device lookup on I/O bus 2011-09-25 19:17:59 +03:00
Kconfig KVM: uses TASKSTATS, depends on NET 2011-08-16 19:00:41 +03:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
kvm_timer.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.c KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
Makefile
mmu_audit.c KVM: Clean up and extend rate-limited output 2011-09-25 19:52:43 +03:00
mmu.c KVM: Optimize dirty logging by rmap_write_protect() 2011-12-27 11:17:20 +02:00
mmu.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
mmutrace.h KVM: MMU: trace mmio page fault 2011-07-24 11:50:41 +03:00
paging_tmpl.h KVM: MMU: improve write flooding detected 2011-12-27 11:17:02 +02:00
svm.c KVM: SVM: Keep intercepting task switching with NPT enabled 2011-10-30 12:24:10 +02:00
timer.c KVM: x86: Simplify kvm timer handler 2011-12-27 11:17:05 +02:00
trace.h KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
tss.h
vmx.c KVM: nVMX: Fix warning-causing idt-vectoring-info behavior 2011-12-27 11:16:45 +02:00
x86.c KVM: Optimize dirty logging by rmap_write_protect() 2011-12-27 11:17:20 +02:00
x86.h KVM: MMU: cache mmio info on page fault path 2011-07-24 11:50:26 +03:00