Received: by 10.223.164.221 with SMTP id h29csp2312122wrb; Thu, 2 Nov 2017 08:59:56 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SkG58sN2WCuYifudb6u+5oTuc1upm+JXKdUb4G/fyTUb/JY9N660Z7yZ+OXe6z4Dqy6b+6 X-Received: by 10.159.203.133 with SMTP id ay5mr2934719plb.361.1509638396827; Thu, 02 Nov 2017 08:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509638396; cv=none; d=google.com; s=arc-20160816; b=Bj744mu52fd7PCzOjvTYmOq3MSaVUPpzfnF+BR/zM32cu0OqrepLUFWo4WAlWrpro/ MCoYXf3xjh4QXXzWQnjH3CJaZOS5cnG/UYbObz+D/ApSoUMWH5Nl1FQl1aXfvMQbV07f wIYzZybzant/EwntS+dUmA23P3LYjfAUjJ07mrEuLAxLc8DAu/rZwUuVQGSax0fuNLcH 44ozZltx4LU2P0VeItsLuAVEhJlNiSeG/2ceKQuhXS2gCjFjx4dIjLDSa7Lp1vrFNB9q dWTSjPrPZlsLz50tXquUiSX3urGv71Y7TN1CBfjaQD59V0HbF1dg5svVXYGSJhFRWlr3 MZQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=n2d9+plCWgxGlkMkb81e3M2xoZMv74Z50qsST7d+nws=; b=tIzbVdX/FnJ+oYtrT685yBYwIXUOit9+MqNeTKGnAI+x5mHgYioJVu+dlqPSEd6pNv 8h/tlUApvuminFS2eAUffodK1Jqv4GI11b3C8V+4nTjhXEAFwUQBu2vsaoJTdEqIRYvz 2V/+l+Kk+24CeJm4LjR1XkqyngWg4F9aaFn/Cl8SfmOTkAAP9SI4feJxhBNAIH8N+ED+ zve3EuZqmXDrcwiSzJr76MNHSRf5JOPnWsvV7hw8vDGSsDNg66YVDSLpUMp0SXj0AFll 3hhQtsszpGo7zAcguhCgZsTdMGkFuGFEpd52jnJILldu9xSpKyEWLTujqPi0FUtrVLnt h8FA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12si3852299pgp.586.2017.11.02.08.59.43; Thu, 02 Nov 2017 08:59:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933986AbdKBP5d convert rfc822-to-8bit (ORCPT + 97 others); Thu, 2 Nov 2017 11:57:33 -0400 Received: from mga06.intel.com ([134.134.136.31]:57719 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244AbdKBP5b (ORCPT ); Thu, 2 Nov 2017 11:57:31 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 02 Nov 2017 08:57:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,335,1505804400"; d="scan'208";a="168457567" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 02 Nov 2017 08:57:30 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Nov 2017 08:57:26 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Nov 2017 08:57:25 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Thu, 2 Nov 2017 23:57:23 +0800 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//+E6gD//3lXsA== Date: Thu, 2 Nov 2017 15:57:22 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537DCB8B@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> <37D7C6CF3E00A74B8858931C1DB2F077537DCB0D@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDYyMzk5NjItZTdkZC00MzMyLTg1N2UtYzlkOWVmZWM4NWNkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ijc5OHo3cU9sZkZEZWhiYUpseTNlVTJ4SGI1OHRGOUkzMnVLZENsY2hRXC9VPSJ9 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Thu, 2 Nov 2017, Liang, Kan wrote: > > > 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. > > Correct, but please try to split 2/5 into parts as well. It's a hodgepodge > of new things and modifications to the code. The logical split is to add > the new data structures and struct members along with the inline helpers > and then in the next patch make use of it. > Sure, I will do that. Also, I just noticed that the '>=' is used in nhmex_uncore_msr_enable_event as well, which does not make sense and unnecessary. For Nehalem and Westmere, there is only one fixed counter for W-Box. It's nhm specific issue, not related to generic code. I will also clean it up in next version. Thanks, Kan From 1582969362732626401@xxx Thu Nov 02 15:40:24 +0000 2017 X-GM-THRID: 1582166476632080836 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread