Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758688Ab1DYRZb (ORCPT ); Mon, 25 Apr 2011 13:25:31 -0400 Received: from leopard.mail.utk.edu ([160.36.0.85]:51485 "EHLO leopard.mail.utk.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758551Ab1DYRZ3 (ORCPT ); Mon, 25 Apr 2011 13:25:29 -0400 X-Greylist: delayed 756 seconds by postgrey-1.27 at vger.kernel.org; Mon, 25 Apr 2011 13:25:29 EDT Date: Mon, 25 Apr 2011 13:12:15 -0400 (EDT) From: Vince Weaver To: Ingo Molnar cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Andi Kleen , Peter Zijlstra , Stephane Eranian , Lin Ming , Arnaldo Carvalho de Melo , Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH 1/1] perf tools: Add missing user space support for config1/config2 In-Reply-To: <20110422080604.GA22611@elte.hu> Message-ID: References: <1303407662-15564-1-git-send-email-acme@infradead.org> <1303407662-15564-2-git-send-email-acme@infradead.org> <20110422063429.GA16643@elte.hu> <20110422080604.GA22611@elte.hu> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1889 Lines: 47 sorry for the late reply on this thread, it happened inconveniently over the long weekend. On Fri, 22 Apr 2011, Ingo Molnar wrote: > But this kind of usability is absolutely unacceptable - users should not > be expected to type in magic, CPU and model specific incantations to get > access to useful hardware functionality. That's why people use libpfm4. or PAPI. And they do. Current PAPI snapshots support offcore response on recent git kernels. With full names, no hex values, thanks to libpfm4. All the world is not perf. > The proper solution is to expose useful offcore functionality via > generalized events - that way users do not have to care which specific > CPU model they are using, they can use the conceptual event and not some > model specific quirky hexa number. No no no no. Blocking access to raw events is the wrong idea. If anything, the whole "generic events" thing in the kernel should be ditched. Wrong events are used at times (see AMD branch events a few releases back, now Nehalem cache events). This all belongs in userspace, as was pointed out at the start. The kernel has no business telling users which perf events are interesting, or limiting them! What is this, windows? If you do block access to any raw events, we're going to have to start recommending people ditch perf_events and start patching the kernel with perfctr again. We already do for P4/netburst users, as Pentium 4 support is currently hosed due to NMI event conflicts. Also with perfctr it's much easier to get low-latency access to the counters. See: http://web.eecs.utk.edu/~vweaver1/projects/papi-cost/ Vince -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/