On Sun, 2007-01-28 at 11:40 +0200, Avi Kivity wrote: > Rusty Russell wrote: > I use virtbench (http://ozlabs.org/~rusty/virtbench) to try > > to measure optimization results; it still needs more tests (and an > > explicit kvm backend). > > A kvm backend would be appreciated.
Yes, and patches are most welcome 8) Actually, I'll work on this week. > >> - after modifying a pte, kvm doesn't preload the modified pte into > >> shadow, but instead lets the guest fault it in > > lguest doesn't either, but don't you still want the fault to update the > > host accessed bit? > > The story here is that the guest is handling a pagefault and writing the > new guest pte. kvm traps the write (guest pagetables are write > protected), and has the option of updating the shadow pte to reflect the > guest pte. > > The clever guest kernel will set the accessed bit (and the dirty bit on > writable ptes) to avoid an rmw cycle by the hardware pagetable walker. > > [two instrumented runs later] > > Both Linux and Windows seem to do this optimization. Right. This (trivial!) optimization wins lguest a good 10%: Before: Time for one Copy-on-Write fault: 13622 nsec Time to exec client once: 1085481 nsec Time for one fork/exit/wait: 700796 nsec After: Time for one Copy-on-Write fault: 12036 nsec Time to exec client once: 969899 nsec Time for one fork/exit/wait: 664601 nsec Thanks! Rusty. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel