From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933856AbdKBO45 (ORCPT ); Thu, 2 Nov 2017 10:56:57 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54619 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933589AbdKBO4z (ORCPT ); Thu, 2 Nov 2017 10:56:55 -0400 Date: Thu, 2 Nov 2017 15:56:45 +0100 (CET) From: Thomas Gleixner To: "Liang, Kan" cc: "peterz@infradead.org" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "acme@kernel.org" , "eranian@google.com" , "ak@linux.intel.com" Subject: RE: [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read for client IMC uncore In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077537DCA69@SHSMSX103.ccr.corp.intel.com> Message-ID: References: <1508843124-4081-1-git-send-email-kan.liang@intel.com> <37D7C6CF3E00A74B8858931C1DB2F077537DCA04@SHSMSX103.ccr.corp.intel.com> <37D7C6CF3E00A74B8858931C1DB2F077537DCA32@SHSMSX103.ccr.corp.intel.com> <37D7C6CF3E00A74B8858931C1DB2F077537DCA69@SHSMSX103.ccr.corp.intel.com> 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 Thu, 2 Nov 2017, Liang, Kan wrote: > > On Thu, 2 Nov 2017, Thomas Gleixner wrote: > > But then you have this in uncore_perf_event_update(): > > > > - if (event->hw.idx >= UNCORE_PMC_IDX_FIXED) > > + if (event->hw.idx == UNCORE_PMC_IDX_FIXED) > > > > So how is that supposed to work? > > This is for generic code. > > In previous code, the event_read function for IMC use generic code. > So we have to deal with >= in generic code. > > Now, customized event_read function 'snb_uncore_imc_event_read' > is introduced for IMC. So IMC does not touch the generic code. > The generic code is corrected here. The customized read function does not help at all. uncore_perf_event_update() is used from snb_uncore_imc_event_stop(). So it's broken with this patch. This is a complete and utter mess to review. Thanks, tglx