From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426168AbcFHUPc (ORCPT ); Wed, 8 Jun 2016 16:15:32 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:34341 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162233AbcFHUP3 (ORCPT ); Wed, 8 Jun 2016 16:15:29 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Wed, 8 Jun 2016 16:15:25 -0400 (EDT) X-X-Sender: vince@macbook-air To: Borislav Petkov cc: Ingo Molnar , tglx@linutronix.de, brgerst@gmail.com, dave@sr71.net, kan.liang@intel.com, torvalds@linux-foundation.org, acme@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, peterz@infradead.org, dvlasenk@redhat.com, hpa@zytor.com, dave.hansen@linux.intel.com, luto@amacapital.net, linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events In-Reply-To: <20160608163446.GF19090@pd.tnic> Message-ID: References: <20160603001929.C5F1C079@viggo.jf.intel.com> <20160608162529.GA25133@gmail.com> <20160608163446.GF19090@pd.tnic> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 On Wed, 8 Jun 2016, Borislav Petkov wrote: > On Wed, Jun 08, 2016 at 06:25:29PM +0200, Ingo Molnar wrote: > > model string : IvyBridge_X > > > > ... or something like that. The string could even be auto-generated from the list > > in intel-family.h? > > Yap, that sounds cool too. And then we should issue that too during boot: > > [ 0.542398] smpboot: CPU0: AMD FX(tm)-8350 Eight-Core Processor (family: 0x15, model: 0x2, stepping: 0x0; Piledriver) > > so that we don't need to ask for dmesg *and* /proc/cpuinfo. > > Hohumm, this should be very useful. However you do it, you want to make the strings match intel-family.h for maximum grepability. It's also unclear what internal names matter. For example is AMD 15h/60h "Carrizo" or "Excavator" or both? I just spent the afternoon making a huge RAPL/APM kernel support matrix for the PAPI people. Lots of fun since arch/x86/events/intel/rapl.c and drivers/powercap/intel_rapl.c support widely different subsets of Intel hardware, and one uses decimal while one uses hex for the model numbers. So I reluctantly admit unifying this all somehow would be nice. (why we need two different interfaces for RAPL is another thing, not to mention the fact that powercap you can read the values as a normal user but with perf you need to be root to read the exact same thing). Vince