From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs Date: Mon, 19 Nov 2012 11:20:38 -0600 Message-ID: <1353345638.10768.1@snotra> References: <20121114043034.GA13832@drongo> <20121114043217.GC13832@drongo> <7B2C8404-8556-4A64-A20A-BDB85F22B94D@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Transfer-Encoding: 8BIT Cc: Paul Mackerras , , To: Alexander Graf Return-path: In-Reply-To: <7B2C8404-8556-4A64-A20A-BDB85F22B94D@suse.de> (from agraf@suse.de on Mon Nov 19 06:36:42 2012) Content-Disposition: inline Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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