From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] bitops: add _local bitops Date: Wed, 09 May 2012 09:45:57 -0700 Message-ID: <4FAA9F45.1080608@zytor.com> References: <20120509134528.GA18044@redhat.com> <4FAA7939.6040706@zytor.com> <20120509154734.GB20867@redhat.com> <4FAA9A49.8080900@zytor.com> <20120509163641.GA21344@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Rob Landley , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Arnd Bergmann , Andrew Morton , David Howells , Akinobu Mita , Alexey Dobriyan , Herbert Xu , Stephen Rothwell , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti , Linus Torvalds To: "Michael S. Tsirkin" Return-path: In-Reply-To: <20120509163641.GA21344@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 05/09/2012 09:36 AM, Michael S. Tsirkin wrote: > > Well it talks about a memory barrier, not an > optimization barrier. > Same thing. > If compiler reorders code, changes will appear in > the wrong order on the current processor, > not just on other processors, no? Yes. For your _local I would just copy the atomic bitops but remote the locks in most cases. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.