From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753128AbbBJRQO (ORCPT ); Tue, 10 Feb 2015 12:16:14 -0500 Received: from casper.infradead.org ([85.118.1.10]:60741 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbbBJRQN (ORCPT ); Tue, 10 Feb 2015 12:16:13 -0500 Date: Tue, 10 Feb 2015 18:16:06 +0100 From: Peter Zijlstra To: Andi Kleen Cc: Andi Kleen , linux-kernel@vger.kernel.org, kan.liang@intel.com Subject: Re: [PATCH 1/3] perf, x86: Add new cache events table for Haswell Message-ID: <20150210171606.GB21418@twins.programming.kicks-ass.net> References: <1423509466-24430-1-git-send-email-andi@firstfloor.org> <20150210103455.GX21418@twins.programming.kicks-ass.net> <20150210171135.GL680@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150210171135.GL680@tassilo.jf.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 10, 2015 at 09:11:35AM -0800, Andi Kleen wrote: > > Now the other tables create little helpers like: > > > > #define HSW_DMND_READ (HSW_DMND_DATA_RD) > > #define HSW_DMND_WRITE (HSW_DMND_RFO) > > > > #define HSW_L3_ACCESS (HSW_ANY_RESPONSE) > > #define HSW_L3_MISS (HSW_L3_MISS) > > > > And compose the tables values using those: > > > > HSW_DMND_READ|HSW_L3_ACCESS > > > > Please do so here too. > > I'm trying to stay with the official documented bit names. No such bit names exist. > If we make up our own names nobody else can read it anymore. Well, its a simple matter of looking up the bit definitions; we define those helpers in terms of the official names after all. By having the 4 helpers {r,w}x{access,miss} you avoid some repetition and decrease the room for mistakes. > > Now; when comparing these value to the SNB for example I note that you > > include ANY_SNOOP and SUPPLIER_NONE in L3_ACCESS, SNB and other do not, > > please explain. > > You're supposed to set a snoop and supplier qualifier. > AFAIK SNB should set them too. It may work without them due to some > quirk. OK, then we should fix the others. Thanks.