From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932971AbbCQQgI (ORCPT ); Tue, 17 Mar 2015 12:36:08 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:42993 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754366AbbCQQgF (ORCPT ); Tue, 17 Mar 2015 12:36:05 -0400 Date: Tue, 17 Mar 2015 09:35:55 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Peter Zijlstra , Mathieu Desnoyers , linux-kernel@vger.kernel.org, KOSAKI Motohiro , Nicholas Miell , Linus Torvalds , Ingo Molnar , Alan Cox , Lai Jiangshan , Stephen Hemminger , Andrew Morton , Josh Triplett , Thomas Gleixner , David Howells , Christoph Lameter Subject: Re: [RFC PATCH] sys_membarrier(): system/process-wide memory barrier (x86) (v12) Message-ID: <20150317163555.GJ3589@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20150316141939.GE21418@twins.programming.kicks-ass.net> <1203077851.9491.1426520636551.JavaMail.zimbra@efficios.com> <20150316172104.GH21418@twins.programming.kicks-ass.net> <1003922584.10662.1426532015839.JavaMail.zimbra@efficios.com> <20150316205435.GJ21418@twins.programming.kicks-ass.net> <910572156.13900.1426556725438.JavaMail.zimbra@efficios.com> <20150316222611.782cc0e4@grimm.local.home> <20150317064055.GK2896@worktop.programming.kicks-ass.net> <20150317114411.GE3589@linux.vnet.ibm.com> <20150317101009.78442f30@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150317101009.78442f30@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031716-0013-0000-0000-000009799213 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2015 at 10:10:09AM -0400, Steven Rostedt wrote: > On Tue, 17 Mar 2015 04:44:11 -0700 > "Paul E. McKenney" wrote: > > > On Tue, Mar 17, 2015 at 07:40:56AM +0100, Peter Zijlstra wrote: > > > On Mon, Mar 16, 2015 at 10:26:11PM -0400, Steven Rostedt wrote: > > > > As I recently found out that this_cpu_read/write() is not that nice on > > > > all architectures, > > > > > > In fact, they only really work well on x86. Aargh64 seems to have a semi > > > usable version, but mostly its quite horrible indeed. > > > > Yeah, if you are in a preempt-disabled region, __this_cpu_read() and > > __this_cpu_write() generate much better code on most platforms. > > I was just having this discussion with Christoph. I originally switched > to using this_cpu_ptr(), but I'll try __this_cpu* instead. I think > Christoph recommended that too. Sounds good to me! ;-) Thanx, Paul