From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 2/4] KVM: introduce "xinterface" API for external interaction with guests Date: Thu, 08 Oct 2009 16:45:51 +0200 Message-ID: <4ACDFB1F.6040803@redhat.com> References: <20091002201159.4014.33268.stgit@dev.haskins.net> <20091002201927.4014.29432.stgit@dev.haskins.net> <4AC8780D.1060800@redhat.com> <4ACA87D7.1080206@gmail.com> <4ACB0F3C.1000705@redhat.com> <4ACB46AD.8010405@gmail.com> <4ACB528D.6030408@gmail.com> <4ACB6F0E.4000407@redhat.com> <4ACB7794.5040308@gmail.com> <4ACB77C8.9060007@gmail.com> <4ACB9D24.2060105@gmail.com> <4ACC4D46.1090805@redhat.com> <4ACC8E19.8070706@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Gregory Haskins , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, "alacrityvm-devel@lists.sourceforge.net" , David Howells To: Gregory Haskins Return-path: In-Reply-To: <4ACC8E19.8070706@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 10/07/2009 02:48 PM, Gregory Haskins wrote: > >> If f() can cause another agent to write to p (by freeing >> it to a global list, for example), then it is its responsibility to >> issue the smp_rmb(), otherwise no calculation that took place before f() >> and accessed p is safe. >> >> > IOW: David is right. You need a cpu-barrier one way or the other. We > can either allow ->release() to imply one (and probably document it that > way, like we did for slow-work), or we can be explicit. No, ->release() must do it or it becomes impossible to program. And in fact it will, to place the freed structure on a global list it must take a lock which implies an smp_rmb(). > I chose to be > explicit since it is kind of self-documenting, and there is no need to > be worried about performance since the release is slow-path. > It's so self-documenting I had no idea what it was there for. -- error compiling committee.c: too many arguments to function