From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933722AbdKBPLF convert rfc822-to-8bit (ORCPT ); Thu, 2 Nov 2017 11:11:05 -0400 Received: from mga02.intel.com ([134.134.136.20]:45549 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932724AbdKBPLE (ORCPT ); Thu, 2 Nov 2017 11:11:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,334,1505804400"; d="scan'208";a="1032673069" From: "Liang, Kan" To: Thomas Gleixner 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 Thread-Topic: [PATCH V3 1/5] perf/x86/intel/uncore: customized pmu event read for client IMC uncore Thread-Index: AQHTTPn8N2Thg1PlBU23gMJh7UBtUqMAoguAgACGaBD//3vBgIAAAViAgACGcoD//3zEgIAAAYeAgACG4uD//4RegAAQ3Stw Date: Thu, 2 Nov 2017 15:10:57 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537DCB0D@SHSMSX103.ccr.corp.intel.com> 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> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmZlOWY4Y2UtMDdlOC00ODBmLWIzY2MtMmYxMzg3N2FkYTEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik5OQWExMU1qUHdMc0pCQ01BTDJhalplRlNETUpjWlRpWHFQczgybzZPaGM9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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. Right, need to use the customized read function to replace it as well. I will fix it in next version. > > This is a complete and utter mess to review. Most of the customized functions will be clean up after the series is applied. Thanks, Kan