Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux