From: Peter Zijlstra Subject: Re: [RFC][PATCH 5/5] arch: Sanitize atomic_t bitwise ops Date: Thu, 6 Feb 2014 19:09:30 +0100 Message-ID: <20140206180930.GJ5002@laptop.programming.kicks-ass.net> References: <20140206134825.305510953@infradead.org> <20140206135001.333583247@infradead.org> <20140206175201.GH5002@laptop.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from merlin.infradead.org ([205.233.59.134]:55590 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403AbaBFSJf (ORCPT ); Thu, 6 Feb 2014 13:09:35 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: "linux-arch@vger.kernel.org" , Linux Kernel Mailing List , Andrew Morton , Ingo Molnar , Will Deacon , Paul McKenney On Thu, Feb 06, 2014 at 09:56:54AM -0800, Linus Torvalds wrote: > On Thu, Feb 6, 2014 at 9:52 AM, Peter Zijlstra wrote: > It's the "_return" variants. As far as I can tell, there are exactly > ZERO users of that stuff, and they are BAD BAD BAD. > > On x86, those things would cause a cmpxchg loop, and the bad > read-for-shared-before-acquire cacheline pattern. > > So why indirectly encourage people to add users for a bad operation? OK, I'll not generate the _return() variants.