On Thu, Feb 21, 2008 at 08:30:04PM +0200, Avi Kivity wrote: > >Perhaps you want to move that enforcement to the host. > > > >This allows batching of future hypercalls (if appropriate) to be easy. > > > > > > I'm still uneasy about it, though I have no rational reasons left now. > > Oh, there is one: with a MMU_OP hypercall you can take the mmu spinlock > once per batch (dropping it once in a while to let another vcpu make > progress or to inject an interrupt).
emulator_write_phys() needs to do blocking work for each pte (mmu_guess_page_from_pte), so that optimization would need quite some work (separate mmu_guess_page_from_pte from kvm_mmu_pte_write). And you can do this optimization even without MMU_OP, just check in advance how many operations will take the mmu lock, do the non-blocking part of them, and then manipulate the mmu lock protected shadow data. Also, holding the spinlock for a longer period is not necessarily an improvement (with the slots_lock it clearly is because there is no write contention). ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel