On Thu, Nov 17, 2011 at 10:55:49AM +1100, Paul Mackerras wrote: > >From dfd5bcfac841f8a36593edf60d9fb15e0d633287 Mon Sep 17 00:00:00 2001 > From: Paul Mackerras <paulus@xxxxxxxxx> > Date: Mon, 14 Nov 2011 13:30:38 +1100 > Subject: > > Currently, kvmppc_h_enter takes a spinlock that is global to the guest, > kvm->mmu_lock, in order to check for pending PTE invalidations safely. > On some workloads, kvmppc_h_enter is called heavily and the use of a > global spinlock could compromise scalability. We already use a per- > guest page spinlock in the form of the bit spinlock on the rmap chain, > and this gives us synchronization with the PTE invalidation side, which > also takes the bit spinlock on the rmap chain for each page being > invalidated. Thus it is sufficient to check for pending invalidations > while the rmap chain bit spinlock is held. However, now we require > barriers in mmu_notifier_retry() and in the places where > mmu_notifier_count and mmu_notifier_seq are updated, since we can now > call mmu_notifier_retry() concurrently with updates to those fields. > > Signed-off-by: Paul Mackerras <paulus@xxxxxxxxx> > --- > Cc'd to kvm@xxxxxxxxxxxxxxx for review of the generic kvm changes. Looks good to me. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html