On 19.11.2012, at 18:20, Scott Wood wrote: > On 11/19/2012 06:36:42 AM, Alexander Graf wrote: >> On 14.11.2012, at 05:32, Paul Mackerras wrote: >> > +/* >> > + * Note modification of an HPTE; set the HPTE modified bit >> > + * if it wasn't modified before and anyone is interested. >> > + */ >> > +static inline void note_hpte_modification(struct kvm *kvm, >> > + struct revmap_entry *rev) >> > +{ >> > + if (!(rev->guest_rpte & HPTE_GR_MODIFIED) && >> > + atomic_read(&kvm->arch.hpte_mod_interest)) >> Aren't atomic reads expensive? > > No, it's a simple load instruction (done with inline asm so the compiler can't break it up into smaller loads). Oh, you're right. Fun. I would've assumed that some cache line locking needs to be done to guarantee atomicity :). But this of course makes things even easier. Alex -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html