From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247Ab3KKVKP (ORCPT ); Mon, 11 Nov 2013 16:10:15 -0500 Received: from mail-ee0-f43.google.com ([74.125.83.43]:46782 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959Ab3KKVKG (ORCPT ); Mon, 11 Nov 2013 16:10:06 -0500 Date: Mon, 11 Nov 2013 22:10:02 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: Vince Weaver , hpa@zytor.com, anton@samba.org, mathieu.desnoyers@polymtl.ca, linux-kernel@vger.kernel.org, michael@ellerman.id.au, paulmck@linux.vnet.ibm.com, benh@kernel.crashing.org, fweisbec@gmail.com, VICTORK@il.ibm.com, tglx@linutronix.de, oleg@redhat.com, mikey@neuling.org, linux-tip-commits@vger.kernel.org, Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , David Ahern Subject: Re: [tip:perf/core] tools/perf: Add required memory barriers Message-ID: <20131111211002.GB19284@gmail.com> References: <20131030104246.GH16117@laptop.programming.kicks-ass.net> <20131106140011.GL10651@twins.programming.kicks-ass.net> <20131106144456.GI26785@twins.programming.kicks-ass.net> <20131106160720.GK26785@twins.programming.kicks-ass.net> <20131106182437.GJ16117@laptop.programming.kicks-ass.net> <20131107082122.GC32438@gmail.com> <20131111162402.GA26898@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131111162402.GA26898@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > On Thu, Nov 07, 2013 at 09:21:22AM +0100, Ingo Molnar wrote: > > > > * Peter Zijlstra wrote: > > > > > > Requiring the user of a kernel interface to have a deep knowledge of > > > > optimizing compilers, barriers, and CPU memory models is just asking > > > > for trouble. > > > > > > It shouldn't be all that hard to put this in a (lgpl) library others can > > > link to -- that way you can build it once (using GCC). > > > > I'd suggest to expose it via a new perf syscall, using vsyscall methods to > > not have to enter the kernel for the pure user-space bits. It should also > > have a real usecase in tools/perf/ so that it's constantly tested, with > > matching 'perf test' entries, etc. > > Oh man, I've never poked at the entire vsyscall stuff before; let alone > done it for ARM, ARM64, PPC64 etc.. > > Keeping it in userspace like we have is so much easier. ... and so much more broken in fantastic ways, right? ;-) Thanks, Ingo