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).
-Scott -- 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